mod_rewrite inside VirtualHost
Posted: Sun Jan 23, 2005 5:43 am
Hi!
I have a question regarding mod_rewrite inside a VirtualHost directive in the httpd.conf
The rewrite action I'm using is pretty simple and works without problem when I put it into a .htaccess file. However, I can't get it to work when I try to put it into the VirtualHost section inside httpd.conf:
This simply rewrites any html file to a php file, e.g. index.html becomes index.php?page=index
Is there anything I need to change in the httpd.conf for this to work?
Thanks!
tylerd
I have a question regarding mod_rewrite inside a VirtualHost directive in the httpd.conf
The rewrite action I'm using is pretty simple and works without problem when I put it into a .htaccess file. However, I can't get it to work when I try to put it into the VirtualHost section inside httpd.conf:
Code: Select all
<VirtualHost 213.162.134.167:80>
ServerName mydomain.com
RewriteEngine on
RewriteRule ^(їa-zA-Z0-9_'"]*)\.html$ index.php?page=$1
DocumentRoot /home/www/mydomain/html
</VirtualHost>Is there anything I need to change in the httpd.conf for this to work?
Thanks!
tylerd