Remove index.php from codeigniter

Hello all
Today I am going to show you, how to remove the index.php part from your codeigniter URL. There are many ways to do it, but based on my previous experience, I got it is the best way to do so. To do so, create a .htaccess file in your directory and copy the following code in your created file.

 

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

 

Now, save this file and run your codeigniter apps. Hopefully, it will work perfectly.

Thanks for reading.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s