CodeIgniter - How to hide index.php from the URL

前端 未结 4 1058
伪装坚强ぢ
伪装坚强ぢ 2021-01-19 02:09

This is what my .htaccess looks like. The .htaccess is sitting in /www/scripts directory which is the parent of codeigniter\'s s

4条回答
  •  無奈伤痛
    2021-01-19 02:52

    Just toss the following code into your .htaccess file

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

    Source: http://codeigniter.com/user_guide/general/urls.html

提交回复
热议问题