我有一個mediawiki網站,我嘗試從URL
中刪除index.php
。用mediawiki縮短網址
所以,我也跟着the doc和一些堆棧溢出的問題,我結束了:
RewriteEngine On
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
但是當我嘗試mysite.com/some_page
,我重定向到mysite.com/index.phhp/my_home_page
而不是mysite.com/index.phhp/some_page
。我錯在哪裏?
謝謝不過比較遺憾的是沒有工作。現在,當我輸入'mysite.com'時,我得到'頁面不工作,重定向到你太多次了' – user1611830
你把這段代碼放在哪裏?在哪個目錄中? –
我把'.htaccess'文件放在網站的根目錄下,與'index.php'相同的級別。 – user1611830