Removing index.php From Codeigniter URL htaccess

Codeigniter Mysql Mysqli php Programming

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 Pakainfo.com – 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!.

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 :

https://www.pakainfo.com/about

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

$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 properly.so To solve this index.php this CI problem just replace

from system/application/config/config.php

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

Example


Related FAQ

Here are some more FAQ related to this Article:

  1.   Date Range Search Jquery DatePicker using Ajax PHP with MySQL
  2.   Smooth Scroll to ID using jQuery
  3.   ng-mouseover Event using Angular Example
  4.   Laravel Calculate Difference Between Two Dates
  5.   jQuery AJAX Dynamic Treeview Menu using PHP, MySQL
  6.   Laravel File Upload Progress Bar Example Tutorial
  7.   Bootstrap Autocomplete Search Box / textbox in PHP MySQL
  8.   Insert Update Delete Query in SQL - SQL CRUD Query
  9.   WordPress HTTP API Remote Requests with wp_remote_get()
  10.   How to Configure Virtual Host in XAMPP

Leave a Reply

Your email address will not be published. Required fields are marked *