6

Rewrite rules stop working when document root changes

view full story
linux-howto

http://serverfault.com – I have two copies of a folder in separate locations. They contain the exact same .htaccess file. Both .htaccess files have the same permissions and owners. /home/sites/site/public_html/ /var/www/html/site/ I had a VirtualHost whose DocumentRoot used to point to /home/sites but I changed it to /var/www and restarted Apache. Now my htaccess rules no longer work. For example, /story/id should rewrite to /index.php?id=$id. If I go to /index.php?id=$id in my browser, the page loads as it should, but if I go to /story/id I get a 404 error. If I change DocumentRoot back to the old root, the link (HowTos)