Forum Moderators: bakedjake

Message Too Old, No Replies

mod_rewrite and .htaccess

works in httpd.conf, not in .htaccess?

         

flex55

4:14 pm on Aug 31, 2003 (gmt 0)

10+ Year Member



Hi,

I've got a simple rewrite condition, that seems to be working well if placed inside <virtualhost> at httpd.conf, yet does not work if placed at .htaccess (of documentroot dir):

RewriteEngine on
RewriteRule ^/(.+)err\.html /error.html [PT,L]

it rewrites to error.html if these directives are placed on httpd.conf, but returns 404 if placed in .htaccess.

anyone has any idea?

marcs

6:48 pm on Aug 31, 2003 (gmt 0)

10+ Year Member



Make sure the relevant AllowOverride entries in your httpd.conf are set to All (or set it to allow what you need only) :

AllowOverride All