开发者

Remove index.php for multiple applications in Codeigniter

I have two folders in application for dev/ and live/ sharing the same system. This is a fresh install. How do I remove the index.php in the url via htaccess? I've tried the provided code:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

However, nothing seems t开发者_如何学Pythono change. How do I adjust the htaccess to remove the index.php from the url path.

Thanks!


If your installation is not at the root of the domain, you should remove the / before index.php:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜