codeigniter remove index.php using .htacss file. by default index.php is included in the URLs.
CodeIgniter removing index.php from url
first of all Create a .htaccess file and then ngo to config.php and there Removing index.php file and then Enable apache mode rewrite and last Restart Apache.
For removing –
To remove index.php from URLs we have to follow Some important Steps.
step 1 : first of all Open config.php and do following replaces
Open application/config/config.php file. find the below code to Update config.php file
$config['index_page'] = "index.php"
Replace to
replace with the below code
$config['index_page'] = ""
if replace then not working please Just replace this line
$config['uri_protocol'] ="AUTO"
by
$config['uri_protocol'] = "REQUEST_URI"
don’t miss : Removing Index.Php From Codeigniter URL Htaccess
.htaccess
RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA]
I hope you get an idea about codeigniter remove index.php.
I would like to have feedback on my infinityknow.com.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.