【发布时间】:2014-02-18 02:41:12
【问题描述】:
我在同一个主机上有两个网站,我的根网站使用 .htaccess,我可以成功浏览它,但我的第二个域向我发送 500 Internal server error 。如果我删除 .htaccess,我可以很好地浏览这两个网站,但我的第一个网站需要 .htaccess。
.htaccess
RewriteEngine on
RewriteCond $1 !^(index\.php|img|css|js|uploads|robots\.txt|sitemap\.xml)
RewriteRule ^(.*)$ index.php/$1 [L]
文件结构
-js
-css
-second-domain.com ( here lies my second domain, i cant browse it , 500 internal server problem )
-upload
.htaccess
index.php
sitemap.xml
我确实希望有人给我正确的命令来输入 .htaccess 以便能够访问我的第二个域,在此先感谢。
【问题讨论】:
-
有时我们可以通过启用 mod_rewrite 模块来解决这个问题