2016-08-22 53 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的孩子正在照顾祖母。