CodeIgniter showing only default controller

后端 未结 15 2874
-上瘾入骨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:24

    i was facing same issue ..its resolved when i use

    $config['uri_protocol'] = 'AUTO'; 
    

    in config.php ..try using AUTO and PATH_INFO for the same

    make sure rewrite_module is on in apache

    0 讨论(0)
  • 2021-02-14 22:24

    Try this htaccess:

    RewriteEngine on
    RewriteCond $1 !^(index\.php|images|robots\.txt)
    RewriteRule ^(.*)$ /mysite/index.php/$1 [L]
    

    Also you should have created controller named user and this controller should ahve function signin.

    0 讨论(0)
  • 2021-02-14 22:25

    Don't write anything in .htaccess file and remove $route['user/(:any)'] = 'user/index'; line and one thing very important make sure in your server mod rewrite extension should me enabled.

    may this help you How to enable mod_rewrite in php.ini on shared hosting

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