Godaddy - Codeigniter - No input file specified on server

前端 未结 4 401
一生所求
一生所求 2021-01-23 17:38

I just uploaded my demo project in subfolder on godaddy . When I open a website url example.com/demo Home page work fine but when I try to open inner p

相关标签:
4条回答
  • 2021-01-23 18:12

    Thank you all for the response.Finally i got the solution.I just changed my config file setting in config.php file.

    $config['index_page'] = 'index.php?'; // replace with (?) mark
    $config['uri_protocol'] = 'QUERY_STRING';
    

    And my .htaccess file are

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
    

    Thanx a lot.Hope it is useful for all.

    0 讨论(0)
  • 2021-01-23 18:13

    Base url should be

    $config['base_url'] = "http://".$_SERVER['HTTP_HOST']."/demo/";
    

    And htaccess file needs this change

    RewriteBase /demo/
    
    0 讨论(0)
  • 2021-01-23 18:15

    Try to put this in your .htaccess file:

    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
    
    0 讨论(0)
  • 2021-01-23 18:21

    Try this code in .htaccess file:

    RewriteEngine on
    RewriteCond $1 !^(index\.php|resources|robots\.txt)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L,QSA]
    
    0 讨论(0)
提交回复
热议问题