1

Why does this Apache 2.2 mod_rewrite RewriteRule not work on 403s?

view story
linux-howto

http://serverfault.com – In my httpd.conf I have: <FilesMatch "^\.ht"> Order allow,deny Deny from all </FilesMatch> And in my .htaccess file I have: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] When I HTTP to example.com/.ht I expect to be redirected to www.example.com/.ht, but instead the RewriteRule never happens. The client is never redirected to www. The client is redirected properly in all other cases. I have no ErrorDocument directives at this time. Just wondering why this happens and how to correct (HowTos)