-2

I had some big issues with removing the index.php. As a general rule the .htaccess below has been tested on several servers and generally works:

how to remove index.php below link in codeigniter http://localhost/test/index.php/home/plans

kk3294120
  • 68
  • 6
  • Which htaccess below? There's a number of questions covering this already; http://stackoverflow.com/questions/6809373/remove-index-php-from-url-codeigniter?rq=1 http://stackoverflow.com/questions/6201409/how-to-remove-index-php-from-codeigniter-url?rq=1 http://stackoverflow.com/questions/5155333/remove-index-php-from-url-codeigniter-2?rq=1 http://stackoverflow.com/questions/9368543/remove-index-php-from-codeigniter-urls?rq=1 – Tom Apr 13 '17 at 09:31
  • create .htaccess file in your root folder and past this [code](http://stackoverflow.com/questions/43364031/redirection-issues-in-live-server/43364089#43364089) – Gopal Bhuva Apr 13 '17 at 09:34
  • RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php/$0 [PT,L] – kk3294120 Apr 13 '17 at 09:36
  • 1
    Possible duplicate of [Remove index.php From URL - Codeigniter 2](http://stackoverflow.com/questions/5155333/remove-index-php-from-url-codeigniter-2) – François Maturel Apr 13 '17 at 11:02

1 Answers1

0

You Have to add .htaccess file in you root folder .

DirectoryIndex index.php
RewriteEngine on

RewriteCond $1 !^(index\.php|(.*)\.swf|forums|images|css|downloads|jquery|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php?$1 [L,QSA]

Save this file as .htaccess in System Folder