How do I remove 'index.php' from URL in CodeIgniter?

后端 未结 7 1832
清酒与你
清酒与你 2020-11-30 13:20

How do I remove index.php from my URL in CodeIgniter?

I removed index.php from my configuration file, and I have run my rewrite_modul

相关标签:
7条回答
  • 2020-11-30 14:02

    For all my Codeigniter projects, I use .htaccess code below:

    RewriteEngine on
    RewriteCond $1 !^(index.php|resources|robots.txt)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L,QSA]
    

    I hope this helps.

    0 讨论(0)
提交回复
热议问题