Removing index.php From Codeigniter URL htaccess

Removing index.php From Codeigniter URL htaccess

In this Post We Will Explain About is Removing index.php From Codeigniter URL htaccess With Example and Demo.Welcome on – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to htaccess remove index.php from urlExample

In this post we will show you Best way to implement how to remove index.php from codeigniter url in localhost, hear for how to remove index.php in codeigniter using htaccesswith Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Also Read :   Live check email Availability Check using PHP and jQuery AJAX

You can download source code and Demo from below link.

If we are using PHP Codeigniter Frameworks we are noticed that by simple default index.php will be included simple with your URL.

But we can simple remove index.php root file from your CodeIgniter’s URL simple so that your CI URL ought to be Like as a :

Removing index.php from Codeigniter URL

There are the Following Step to remove your routing index.php files.

Step 1.First of all Open The config.php file as well as this path is from system/application/config Folders and replace

Also Read :   CodeIgniter Stripe Payment Gateway Api Integration

$config['index_page'] = "index.php" by $config['index_page'] = ""

Step 2.Create a simple root file Like as a “.htaccess” file in the root of PHP CodeIgniter Folders Simple (where the Computer system Folders resides), and then open the simple path file using your Notepad++ or any favorite text editor, write down PHP CodeIgniter Simple the following script and save it and run

RewriteEngine on
RewriteCond $1 !^(index.php|resources|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

Step 3.and then Last step to In some case the PHP default your CI simple setting for Http uri_protocol (http:// or https://) protocols does any not work simple To solve this index.php this CI problem just replace

Also Read :   PHP Technical Interview Questions and Answers

from system/application/config/config.php

$config['uri_protocol'] = "AUTO" by $config['uri_protocol'] = "REQUEST_URI" 

You can download source code and Demo from below link.



Add a Comment

Your email address will not be published.