.htaccess
Some useful directives for .htaccess
Turn on Rewrite:
RewriteEngine On
Configure the base path
RewriteBase /
Forces HTTPS and without WWW
RewriteCond %{HTTP_HOST} ^visualgui.com
RewriteRule (.*) https://visualgui.com/$1 [R=301,L]
Redirect everything file in a directory
RewriteRule ^old-dir/(.+)$ /new-dir/$1 [R=301,L]
Redirect old URL to new URL
Redirect /old-file/ /new-file/
Custom 404
ErrorDocument 404 /404.php
Prevent directory listing when index file is not present
Options -Indexes