yii で index.php を削除する方法を検索します。正常に動作していますが
、Yii Framework で index.php を削除する方法
保護された/config/main.php
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'redirect/<redirectUrl>'=>'site/index',
'login'=>'site/login',
'privacy'=>'site/privacy',
'password'=>'site/forgot',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
私のhtaccessファイル
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
</IfModule>
次のURLを確認すると
yii.mywebapp.com/index.php?redirecturl= http://www.google.com
動作していますが、index.phpを削除しました
yii.mywebapp.com/?redirecturl= http://www.google.com
それも機能しています
しかし、いくつかのユーザーが yii.someurl.com/index.php?redirecturl=someurl でリダイレクト URL を要求したときに、URL に index.php を隠したい場合に必要です。
助けてください