CodeIgniter removing index.php not working

后端 未结 4 737
悲&欢浪女
悲&欢浪女 2021-01-15 04:12

I\'m using Ubuntu 13 with the following setup for a local codeigniter site.

Apache/2.4.6 (Ubuntu)
5.5.3-1ubuntu2.2 
\'CI_VERSION\', \'2.1.2\'
4条回答
  •  爱一瞬间的悲伤
    2021-01-15 04:55

    I would try something like:

    RewriteRule ^(?!index)(.*)$ index.php?/myvariable=$1 [L]
    

    If you know what GET variable the script is expecting for controllername in localhost/controllername, then in the rule replace myvariable with that variable name.

提交回复
热议问题