XAMPP, CodeIgniter, and mod_rewrite (issues) |
[eluser]Nicholas Bello[/eluser]
Let me begin by apologizing if this is not the correct forum to post my question. So if i'm wrong... sorry. Now, onto the problem: I have xampp installed on windows XP. I've enabled mod_rewrite in the apache conf file, and i'm using the .htaccess file i grabbed from the wiki here at http://codeigniter.com/wiki/mod_rewrite/ I have restarted my webserver and followed step by step instructions to enable .htaccess files and mod rewrite. With all that in place my application resides at http://localhost/ci/ Now the problem i get is when i go to http://localhost/ci/login I get redirected to http://localhost/xampp/. When i go to http://localhost/ci/index.php/login i'm fine. Now i have my config variable set to $config['index_page'] = ""; and i have the htaccess file inplace. I may have just been staring at this to long but i have no idea what's happening. I know it is not a CI problem and somewhere the issue has to lie with mod_rewrite but i'm fresh out of ideas. Any help would be greatly appreciated. Thanks, Nick
[eluser]Henry Weismann[/eluser]
My best guess would be that the server or htaccess is set up wrong somehow. I would look in your apache config file for "xampp" or an htaccess file somewhere in a folder above the ci folder.
[eluser]Nicholas Bello[/eluser]
Thanks for you feedback, it caused me to look into the directories a little more. I don't have the solution yet but I fixed the redirecting so now I am getting a 404 error rather than being redirected to http://localhost/xammp This tells me that mod_rewrite is not installed properly, so i am one step closer to the solution. -Nick
[eluser]Nicholas Bello[/eluser]
Found Answer! Had to change the following line in my htaccess file: RewriteRule ^(.*)$ index.php/$1 [L] To: RewriteRule ^(.*)$ ci/index.php/$1 [L] Because my app is in a sub folder it was not re-writting properly. |
Welcome Guest, Not a member yet? Register Sign In |