How To Remove Index.php From CodeIgniter in Windows Xampp

Leave a Comment

Remove Index.php From CodeIgniter

Follow This Step
1. First check mod_rewrite is enabled or not
2. To check this create php file type in that
3. Run into broswer

4. Search for the mod_rewrite if you will find that in loaded module then its enabled else you have to enabled this mod_rewrite check this tutorials for enable mod_rewrite
5. After that create .htaccess file in your root folder of codeigniter
6. Copy this below codeand paste into that .htaccess file
  RewriteEngine On
  RewriteCond $1 !^(index\.php|resources|robots\.txt)
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php/$1 [L,QSA]
7. After that change into the config.php of codeigniter
  $config['index_page'] = 'index.php';
  $config['index_page'] = ' ';

8. Here you done now run the file with index.php using url http://localhost/ci/welcome
Any problem then comment below

You Can Watch Video Here

Helpful links

How to enable mod_rewrite in apache2
How to enable mod_rewrite in xammp windows
Powered by Blogger.