Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to remove index.php from Codeigniter

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 371
    Comment on it

    Hello Reader! If you are new to working on Codeigniter Framework for PHP then you are very likely to encounter with the problem of index.php in url. Now we will see how to get resolve this error and then after you do not need to include index.php in you url.

    To fix this, you need to open .htaccess file, you can find it in root folder. On making it custom we make the new rules to file.
    Paste the code as below in your .htaccess file:-

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

    Then next step to is configure you framework

    Open file config.php, You will find it on Location : - application/config/config.php

    $config['index_page'] = 'index.php';
    

    Now find the above line and remove index.php

    $config['index_page'] = '';

    Now you can see the changes it's all done.

 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: