2016-08-22 17 views
0

我有兩個htaccess的重寫條件:的.htaccess的RewriteCond帶我去404 - 文件夾存在

RewriteCond %{HTTP_HOST} ^(www\.)?gotham.rentals$ 
RewriteRule !^gothamrentals/ /gothamrentals%{REQUEST_URI} [L] 

RewriteCond %{HTTP_HOST} ^(www\.)?sofla.biz$ 
RewriteRule !^southflorida/ /southflorida%{REQUEST_URI} [L] 

的第一個工程,第二個(從服務器404)沒有。是什麼賦予了?南佛羅里達文件夾存在並具有與文件夾gothamrentals相同的權限。

+0

如果您可以從錯誤日誌中提供更多相關信息。 Apache HTTPD不會給出任意的404錯誤。您也可以暫時切換爲包含R標誌以進行外部重定向,並親眼看到請求結束的位置,以及哪些元素不是真正存在的位置。 –

回答

1

我使用的答案補充說:

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

到southflorida目錄。我懷疑,也許「/」被添加到網址和htaccess的孩子正在照顧祖母。

相關問題