How to remove index.php from Codeigniter URL?

I would like to explain about removing index.php from codeigniter based application urls with .htaccess.To hide “index.php” from the URL, add an .htaccess file to your web root, with following text:

NOTE: If you are website located in sub directory , instead of ‘RewriteBase / ‘ add ‘RewriteBase /sub directory name ‘.For example if you webiste located in htdocs/ciapp/ then the rule should be RewriteBase /ciapp.

After add .htaccess file go to applications/config/ open config.php, in the config array, remove index_page value

In some cases default settings of uri_protocol doesn’t work properly.To fix this problem just change below code in config.php located at application/config/ directory

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

0 0 vote
Article Rating
Notify of
Inline Feedbacks
View all comments Protection Status
Would love your thoughts, please comment.x