CodeIgniter showing only default controller

后端 未结 15 2878
-上瘾入骨i
-上瘾入骨i 2021-02-14 21:59

I am using Codeigniter in Local WAMP. Here code is working fine. But i upload in Cpanel ( inside of example.com, folder name call \'mysite\'). Ther

15条回答
  •  离开以前
    2021-02-14 22:22

    Open config.php and do following replaces

    $config['index_page'] = "index.php"
    to
    $config['index_page'] = ""
    

    In some cases the default setting for uri_protocol does not work properly. Just replace $config['uri_protocol'] ="AUTO" by $config['uri_protocol'] = "REQUEST_URI"

    HTACCESS

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

提交回复
热议问题