Recently, I've added rewrite lines to my .htaccess file like so:
ErrorDocument 404 /error_pages/404.htmlErrorDocument 401 /error_pages/401.htmlRewriteEngine OnRewriteCond %{HTTP_HOST} www.thehowtobrainiac.comRewriteRule (.*) http://thehowtobrainiac.com/$1 [R=301,L]
This didn't work, and I have no idea why it came to my mind, I tried switching the ErrorDocument and RewriteBlahBlah like this:
RewriteEngine OnRewriteCond %{HTTP_HOST} www.thehowtobrainiac.comRewriteRule (.*) http://thehowtobrainiac.com/$1 [R=301,L]ErrorDocument 404 /error_pages/404.htmlErrorDocument 401 /error_pages/401.html
Now it works. That's great, but I would like to know why it works, and the other way doesn't?