codeigniter routes is not working

后端 未结 2 440
长情又很酷
长情又很酷 2021-01-26 08:30

I have the following problem with CodeIgniter. I\'m trying to setup a menu, and using route config to load the proper content but from some reason it\'s not working.

I h

相关标签:
2条回答
  • 2021-01-26 08:40

    I think a .htaccess file is missing. Create a new file with this content and save it in the CI root.

    RewriteEngine on
    RewriteBase /new/CodeIgniter
    RewriteCond $1 !^(index\.php|robots\.txt)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L,QSA] 
    
    0 讨论(0)
  • 2021-01-26 08:47

    Make sure you mod_rewrite enabled (check through phpinfo that is enable or not).

    For enable mod_rewrite check following

    1. For Linux
    2. For window

    And add this .htacess

    where to add

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

    in your root folder

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