.htaccess to have clean url, without index.php ? :(... |
[eluser]sikko[/eluser]
Hi, I'm trying to set up a htaccess file to redirect all my /controller/method to /index.php/controller/method For that, i've used the code igniter htacess: Code: RewriteEngine on You know what ? it works fine on my localhost, but not online ! (my website) It just doesn't recognize the matched expression represented by $1. To see what the htaccess has in output, i wrote this rewriteRule: Code: RewriteRule ^(.*)$ toto.php?t=$1 [L] Code: echo 't = '.$_GET['t'].' !!!'; But the output is: Quote:t = toto.php !!! I don't know if it takes the file name, or if the regex is badly delimited... or whatever.... I CAN'T understand where is the problem... i've spent my whole night on it.... but no changes... Please I'm lost ! Thank you for your help!
[eluser]stormbytes[/eluser]
Funny - I have the exact opposite problem. I'm runing Mamp on OSX and can't get *rid* of my index.php!
[eluser]sikko[/eluser]
Hi, I just solved my problem by following this tutorial: http://codeigniter.com/wiki/mod_rewrite/ I've just made the files modification, because I can't configure my server. But it works. I don't understand why it does work now, and didn't with the previous htaccess... Anyway ! thank you ! bye sikko
[eluser]Paulo Carvalho [/eluser]
Make sure that in both cases online/localhost url_rewrite is ON! |
Welcome Guest, Not a member yet? Register Sign In |