Mobile app version of vmapp.org
Login or Join
XinRu657

: Why does Apache parse .htaccess if accessed through the main page and not through a VirtualHost? I have two websites. One is hosted on /var/www (www.example.com) and the other is /var/www/test

@XinRu657

Posted in: #Apache #Htaccess

I have two websites. One is hosted on /var/www (www.example.com) and the other is /var/www/test (test.example.com). The second is a VirtualHost.

I wrote a .htaccess (I'm using it to mod_rewrite), put it into /var/www/test, and enabled AllowOverride all on the /var/www <Directory>.

Yet, when I go to the webpage example.com/test, Apache processes it, while if I go to test.example.com it doesn't.

What can I do to fix the problem?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @XinRu657

1 Comments

Sorted by latest first Latest Oldest Best

 

@Si4351233

Add AllowOverride All in the directory settings within the vhost and that should solve your issues.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme