CodeIgniter removing index.php from url

前端 未结 30 1414
[愿得一人]
[愿得一人] 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:15

    Follow these step your problem will be solved

    1- Download .htaccess file from here https://www.dropbox.com/s/tupcu1ctkb8pmmd/.htaccess?dl=0

    2- Change the CodeIgnitor directory name on Line #5. like my directory name is abc (add your name)

    3- Save .htaccess file on main directory (abc) of your codeignitor folder

    4- Change uri_protocol from AUTO to PATH_INFO in Config.php file

    Note: First of all you have to enable mod_rewrite from httpd.conf of apachi by removing the comments

提交回复
热议问题