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
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.
I am Arjun from Hyderabad (India). I have been working as a software engineer from the last 7+ years, and it is my passion to learn new things and implement them as a practice. Aside from work, I like gardening and spending time with pets.