onlinecode

Codeigniter Remove index.php using htaccess

Codeigniter Remove index.php using htaccess

In this post we will give you information about Codeigniter Remove index.php using htaccess. Hear we will give you detail about Codeigniter Remove index.php using htaccessAnd how to use it also give you demo for it if it is necessary.

Hi Developer,

I want to share this tutorial for codeigniter remove index.php from url using htaccess file. i will show you code for how to remove index php from url in codeigniter using htaccess.

htaccess file provide a control to remove index.php name from url and also we can some validation on htaccess file if you want. you can also redirect your site http to https using htaccess.

As we know, codeigniter run index.php and with another route, it’s come with index.php file in url. I had same issue on my ubuntu. when i was working on my client project on localhost. i did remove index.php file from url using htaccess file.

So, here you have to simply write below code on your .htaccess file on codeigniter project. let’s open and add below code on it.

.htaccess

Also see:Codeigniter Form Validation with Error Message

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php/$1 [L]

Now you can update your htaccess file and check it.

Now you can run your project.

I hope it can help you…

Hope this code and post will helped you for implement Codeigniter Remove index.php using htaccess. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

For More Info See :: laravel And github

Exit mobile version