1

My codeigniter project is working properly on the development server, but when I migrated this on live server I'm facing issue with the .htaccess file. I can't be removed index.php file. It gives an error 404 not found.

1 Answers1

1

Finally, i fixed this, follow below steps.

  1. just follow steps CodeIgniter user guide- removing index.php from url.
  2. Add .htaccess in root where application and system folders are located.
  3. Set $config['base_url'] = 'http:/your domain IP/ci folder name'; Note: path - ..config/config.php
  4. Set $config['index_page'] = ""; Note: path - ..config/config.php
  5. imp. Add below code in httpd.conf file.

    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
    

    And restart the server. Fixed.

  • Don't use ip in domain base url your css and other links may not work `$config['base_url'] = 'http://localhost/project/';` –  Jun 02 '17 at 10:49
  • https://github.com/wolfgang1983/htaccess_for_codeigniter –  Jun 02 '17 at 10:50