2012-12-21 44 views
0

我有2臺虛擬主機是這樣的:Apache的mod_rewrite的,的.htaccess和虛擬主機衝突

<VirtualHost *:80> 
DocumentRoot /var/www/html/watermelon/hhgt/webroot 
ServerName booking 
#ErrorLog logs/booking-error_log 
#CustomLog logs/booking-access_log common 
<Directory /> 
    Options FollowSymLinks 
    AllowOverride All 
</Directory> 
</VirtualHost> 

<VirtualHost *:5321> 
    DocumentRoot /var/www/html/watermelon/ik/webroot 
    ServerName hotspot.local 
    ErrorLog logs/hotsppot.local-error_log 
    CustomLog logs/hotsppot.local-access_log common 
    <Directory /> 
     Options FollowSymLinks 
     AllowOverride All 
    </Directory> 
</VirtualHost> 

和他們有相同的.htaccess:

<IfModule mod_rewrite.c> 
    RewriteEngine On 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteRule ^(.*)$ index.php [QSA,L] 
</IfModule> 

有時第一虛擬主機加載第二個的虛擬主機指數.PHP!

有什麼想法?

+0

加載'hotspot.local'時是否使用了正確的端口? I.E. 'HTTP://hotspot.local:5321'? – Gerben

回答

1

這可能是因爲您使用默認的在/ etc/apache2的/網站可用/

檢查您是否已經安裝了可用的站點正確,還檢查在/ var Apache的日誌/日誌/ Apache2的