Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • If you want to remove index.php from url in Codeignitor

    • 0
    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 428
    Comment on it

    If you want to remove index.php file path form url in codeignitor then please follow below steps

    1. create .htaccess file in your root folder and place this code there
        RewriteEngine on
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule .* index.php/$0 [PT,L]
    
    1. Then go to application / config / config.php then change below settings
        $config['base_url']    = '';
        to
        $config['base_url']    = 'http://localhost/CodeIgniter';
    
       $config['index_page'] = 'index.php';
       to 
       $config['index_page'] = '';
    
    1. Now go to address bar of your browser and remove index.php then run and it work definitely.

      http://localhost/CodeIgniter/index.php/news
      to 
      http://localhost/CodeIgniter/news
      

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: