2012-04-09 40 views
0

我的.htaccess我/移動目錄之前:的htaccess的rewrite在服務器上執行的腳本提供完全不同的腳本

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 
</IfModule> 

我有我的索引MySQL查詢基本上增加頁數,當我打開m.mysite .net/style.css(這是/mobile/style.css)它執行服務器上的index.php,但仍然提供style.css沒有問題...爲什麼它執行index.php如果style.css是一個定位文件?

下面是目錄中的Apache配置:

<VirtualHost *:80> 
    DocumentRoot /var/www/mobile 
    ServerName m.mysite.com 
    ServerAlias m.mysite.net 
</VirtualHost> 

我怎樣才能避免執行任何腳本,只是提供絕對的文件嗎? 我需要改變什麼?

回答

0

您的.htaccess似乎是正確的。 style.css應該在沒有index.php的情況下傳遞。

但是。你可以在你的css裏面有圖像,就像

background: url(/img/still/not/exists.png) 

這張圖片可能會丟失,並且你有index.php調用。

無論如何,這是一個當然的猜測:)

相關問題