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它不應該重定向,它應該只是爲您提供內容。 –