CodeIgniter Forums
How to eliminate index.php in url? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: How to eliminate index.php in url? (/showthread.php?tid=7881)



How to eliminate index.php in url? - El Forum - 04-25-2008

[eluser]inktri[/eluser]
I'm using an .htaccess to have all http://localhost/controller/function utilize http://localhost/index.php/controller/function

Quote:RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

HOWEVER, clicking on any link or submitting a form in any view redirects to the url with the index.php. How can I eliminate index.php's in these scenarios?

Thanks for the help


How to eliminate index.php in url? - El Forum - 04-25-2008

[eluser]esra[/eluser]
There is an article posted on the wiki. The recommended .htacess does not work for all users, so you may need to do a forum search to find alternate solutions.


How to eliminate index.php in url? - El Forum - 04-25-2008

[eluser]garymardell[/eluser]
In the config file, where it says 'index.php' can't remember what option it is but change it to just '' (so blank)


How to eliminate index.php in url? - El Forum - 04-25-2008

[eluser]inktri[/eluser]
thanks that worked


How to eliminate index.php in url? - El Forum - 05-06-2008

[eluser]codeamanny[/eluser]
bump this should be added to documentation