Can anyone help to solve problem with overriding in apache2?
I have enabled mod_rewrite in apache2.
But apache is just ignoring my .htaccess file's rewrite rules.
This is my virtual host configuration:
开发者_C百科<VirtualHost *:80>
ServerName www.modomain.eu
ServerAlias mydomain.eu *.mydomain.eu mydomain.es *.mydomain.es
DocumentRoot /home/sites/mydomain.es
<Directory /home/sites/mydomain.es>
AllowOverride None
</Directory>
</VirtualHost>
.htaccess files aren't processed if you have AllowOverride set to "none". If you set it to "allowoverride all" it should allow you to override the settings in your vhost configuration file.
Read here e.g.:
By default, mod_rewrite configuration settings from the main server context are not inherited by virtual hosts. To make the main server settings apply to virtual hosts, you must place the following directives in each section:
RewriteEngine On RewriteOptions Inherit
Set the following:
AllowOverride All
In the <Directory>
stanza
This will allow the .htaccess file to be able to override various settings (such as rewrite rules)
精彩评论