oracle11011回答ポイント なしウォッチ

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>

サーバーはロリポップのレンタルサーバーです。

ご存知の方宜しくお願いします。

ログインして回答する

みんなの回答

この質問へのコメント

この質問への反応(ブックマークコメント)

質問の情報

登録日時
2012-11-29 17:14:09
終了日時
2012-12-06 17:15:03
回答条件
1人5回まで

この質問のカテゴリ

この質問に含まれるキーワード

.htaccess519PHP7798ロリポップ272ドメイン2066レンタルサーバー874Routes19リダイレクト414サーバー4609URL11376

人気の質問

メニュー

PC版