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

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 99
    Comment on it

    Hello Friends,

    If you are looking to remove index.php from URL. By default Codelginter Path will appear like this "http://www.abc.com/index.php/users/userinfo", if you want to change this with "http://www.abc.com/users/userinfo"

    //Replace your .htaccess file rewrite code as below ::

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule .* index.php/$0 [PT,L]
    

    //Open application/config/config.php

    $config['index_page'] = 'index.php';
    Replace this with
    $config['index_page'] = '';
    
    //Now find
    
    $config['uri_protocol'] = "AUTO" 
    Replace this with
    $config['uri_protocol']    = "REQUEST_URI";
    

 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: