0

RewriteBase is set in httpd.conf for an alias:

Alias /test /home/user/test
<Directory "/home/user/test">
    AllowOverride All
    Allow from All

    RewriteEngine On
    RewriteBase /test
    RewriteRule ^foo$ foo.html [QSA,L]
</Directory>

This works fine: http://example.com/test/foo is foo.html.

Now, I'd like to move the RewriteRule to .htaccess, because that's where it makes more sense. It's a configuration for the test project after all. However, if I do that, then RewriteBase is not interpreted any longer, and loading http://example.com/test/foo fails.

Is there any way to set RewriteBase in httpd.conf plus RewriteRule in .htaccess?

feklee
  • 533
  • 5
  • 20

0 Answers0