CodeIgniter removing index.php from url

前端 未结 30 2147
[愿得一人]
[愿得一人] 2020-11-21 11:51

My current urls look like this [mysite]index.php/[rest of the slug].
I want to strip index.php from these urls.

mod_rewrite

30条回答
  •  天命终不由人
    2020-11-21 12:21

    Note the difference with the added "?" character after ".php", especially when dealing with CodeIgniter:

    RewriteRule ^(.*)$ index.php/$1 [L]

    vs.

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

    It depends on several other things.. if doesn't work, try the other option!

提交回复
热议问题