0
不同的结果
我已经设置了以下重写规则的mod_rewrite对Windows和Ubuntu的
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ core/index.php [L]
和网站架构是
newsite
﹂ .htaccess
﹂ core
﹂ index.php
如果我使用的网址:HTTP ://本地主机/ web/newsite/test在Windows上
它将重定向到/web/newsite/core/index.php
和这行得通!
但如果使用url 的http://本地主机/〜USER1 /网络/ newsite /测试在Ubuntu
会重定向到/home/user1/public_html/web/newsite/core/index.php
不/~user1/web/newsite/core/index.php
所以,我怎么能解决这个问题?
谢谢!
感谢您的回答,但是如果我使用RewriteBase,我必须在每个服务器中设置不同的RewriteBase。 那么,有什么办法可以解决问题吗? –
@AzureChen它不应该重定向,它应该只是为您提供内容。 –