Stupid Simple .htaccess problem |
[eluser]johnmchilton[/eluser]
Hi there, I have a CI install at http://www.example.com/ci/ So, pages look like http://www.example.com/ci/index.php/controller/function I am wondering what to put in the .htaccess file to remove the index.php from this. Does anybody know? Thanks.
[eluser]jamie young[/eluser]
Follow the steps listed at http://codeigniter.com/wiki/mod_rewrite/ That should get it going for you.
[eluser]johnmchilton[/eluser]
The problem is that I know how to do steps 2-5, but I don't know how to get the desired effect with a .htaccess file, and all the tutorials online seem to be written for people who already know how to do it. Can somebody point me in the right direction?
[eluser]inet411[/eluser]
Here is what I use: Code: RewriteEngine on Works for me. Hope it helps you.
[eluser]stdio[/eluser]
Thank you inet! This is what I needed. Works perfectly!
[eluser]johnmchilton[/eluser]
I ended up editing my apache configuration to add a <Directory /var/www/ci/> with: RewriteCond $1 !^(index.php|media) RewriteRule ^(.*)$ index.php/$1 [L] Three cheers for workarounds, am I right? |
Welcome Guest, Not a member yet? Register Sign In |