.htaccess - how to hide index.php from my url in yii framework -
my code runs url:
http://localhost/yii/index.php/adminlogin
i want url like:
http://localhost/yii/adminlogin
.htaccess file
options +followsymlinks indexignore */* rewriteengine on # if directory or file exists, use directly rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d # otherwise forward index.php rewriterule . index.php
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>', ), ),
rewriterule ^ index.php [l]
instead of rewriterule . index.php
Comments
Post a Comment