Is .htaccess enabled?
To test whether .htaccess is enabled on your web server, create two files with unique content and add the following to your .htaccess file (if the leftmost file is loaded, then .htaccess will be enabled):
404 error — “page not found”:
301 error — “moved permanently”:
Redirect serves the browser a different URL to use, and the browser is aware of the redirect. Rewrite is a set of conditional rules that leaves the client’s browser none the wiser of the rewrie (in contrast to Redirect’s if EXACTLY THIS do EXACTLY THAT nature).
A Rewrite request is made up of two parts—RewriteCond and RewriteRule. RewriteCond defines when the RewriteRule should be used and RewriteRule defines what is to be done.
Replace non-canonical URLs with a canonical URL (this is actually processed as a 301 redirect):
Remove any trailing slashes from the URL:
Remove index.html from the URL:
Set rules for search engine robots: