/ Published in: Apache
Hiding index.php from url
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
File: .htaccess LoadModule rewrite_module modules/mod_rewrite.so RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)\?*$ index.php/$1 [L,QSA] 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 File : conifg/main.php 'urlManager'=>array( 'urlFormat'=>'path', 'showScriptName'=>false, 'caseSensitive'=>false, ),
URL: http://www.yiiframework.com/wiki/214/url-hide-index-php/