How do I use apache mod_rewrite with an Alias ? I have a test directory that contains the files: correct.html index.html test_httpd.conf wrong.html I would like an example rule using an alias that directs any requests to wrong.html be redirected to correct.html. And another example rule that directs any requests for any files in the directory test to point to correct.html Here is what I have tried in my test_httpd.conf:
#DocumentRoot /var/www/localhost/htdocs/test Alias /test /var/www/localhost/htdocs/test/ #<Directory /var/www/localhost/htdocs/test> #<Directory /test> <Directory test> RewriteEngine On #RewriteRule ^*$ rewriteme.html [R] RewriteRule ^wrong.html$ correct.html [R] </Directory>
I am on apache 2.4.6-r2 on Gentoo.