What I need in my .htaccess:
encoding (or is it charsets?)
- Code: Select all
AddCharset utf-8 .html .css .rdf .txt .xml .rss
error documents
- Code: Select all
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 410 /error/410.html
www. to non-www.
- Code: Select all
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
hiding of the .html extension
(see thread)
hand-crafted RedirectPermanent
(explicit / absolute URLs, for a few deleted/moved pages)
in detail:
should I enclose the www to non-www. redirection into the <IfModule mod_rewrite.c> block of the .html extension hiding? Or should I open a new block? Or should I write it without any enclosing block?
manual RedirectPermanent (like RedirectPermanent /about.html http://example.com/) before or after the www to non-www. / .html extension hiding blocks?
Options (like Options +FollowSymLinks -MultiViews) at the very top, or before it is needed by a block?
... and so on.