I've setup CodeIgniter for my desktop version of the website for the first time, and I'm having a little problems after changing AllowOverride from None to All so that the following .htaccess rules work:
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|m|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
The problem is, I have a mobile version of the website located at m.domain.com - which pulls its content from domain.com/m. When AllowOverride was 'None', this worked perfectly. Now that I've changed it to 'All' and implemented the above .htaccess file - the subdomain no longer works and I get a "Test Page for the Apache Server" html file displayed.
Anyone have any idea what could be causing the problem?! T开发者_运维知识库hanks!
Why do you AllowOverride All for just one htaccess file when you could embed it in the vhost conf and go back to AllowOverride None where things seems to work better for you ?
On a side note AllowOverride All is something you usually try no do to.
Example :
<VirtualHost *:80>
ServerAlias yourdomain.com
DocumentRoot /var/www/
<Directory "/var/www/folder">
RewriteEngine On
RewriteRule XXXXXX
</Directory>
<Directory "/var/www/another">
RewriteEngine On
RewriteRule XXXXXX
</Directory>
</VirtualHost>
精彩评论