0
我想重定向頁面www.mysite.com/index.php到www.mysite.com/以防止重複的內容問題,但這會導致我可以因爲這會重定向http://www.example.com/administrator/index.php到http://www.example.com/administrator/。我正在使用以下.htaccess重定向index.php到根影響管理員登錄
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.(html?|php)\ HTTP/
RewriteRule (([^/]+/)*)index\.(html?|php)$ http://www.example.com/$1 [R=301,L]
但我不得不評論它登錄。請任何人都可以告訴我我哪裏錯了?
*我發現一個帖子的提示
RewriteCond %{REQUEST_URI} !^/administrator could go in the middle, would that be right? Sorry, new to all this :)