开发者

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'] = '';
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜