CakePHP2.2 .htaccess indexなし統一
お世話になっています。
?http://ドメイン
?http://ドメイン/index/
トップページのみ2つのURLでアクセスできてしまいます。
リダイレクトされません。
(他のページはwwwとindex/がちゃんと消えます)
routes.php
Router::connect('/', array('controller' => 'Index'));
/app/webroot/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{THE_REQUEST} ^.*/index/
RewriteRule ^(.*)index/$ http://www.example.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.example\.com
RewriteRule (.*) http://example.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
サーバーはロリポップのレンタルサーバーです。
ご存知の方宜しくお願いします。