Codeigniter - getting 404 Not Found error

前端 未结 9 1867
慢半拍i
慢半拍i 2021-02-20 02:26

We have two hosting packages at godaddy. Our live website is working fine using following .htaccess file. Website is accessible without using index.php in url.

R         


        
9条回答
  •  独厮守ぢ
    2021-02-20 02:38

    I have faced the similar problem when I move on godaddy server.And It's work for me.

    Add this code into your .htaccess file.

    
        RewriteEngine On
    
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
    
       # Rewrite all other URLs to index.php/URL
       RewriteRule ^(.*)$ index.php?url=$1 [PT,L] 
    
    
    
           ErrorDocument 404 index.php
    
    

    In config file:

    $config['base_url'] = 'domain.com';
    $config['index.php'] = '';
    

    And Set AllowOverride to All in your httpd.conf

    set the correct permission on the /cache folder, rather than just making the folder writable you need to make it reclusively writable.

    I hope it will work for you.

提交回复
热议问题