How to hide index.php from Url by htaccess
With respect to Code Ign开发者_运维知识库iter And MySql:
How to hide index.php from Url by htaccess?See the CodeIgniter Manual.
In your document root, a .htaccess
file containing the following:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt) # these are examples,
# add everything here that
# you **don't** want to be
# routed to CI
RewriteRule ^(.*)$ /index.php/$1 [L]
Then in application/config/config.php
change:
$config['index_page'] = '';
精彩评论