Need help with mod_rewrite! |
[eluser]Unknown[/eluser]
Hi I've been trying to remove the 'index.php' part of my url while working with codeigniter. I can't seem to get it working, and it feels like I've been trying everything. Can anyone help me? this is my .htaccess: Code: <IfModule mod_rewrite.c> and this is my config: Code: $config['base_url'] = 'http://localhost/robbin/ci/'; I have a view called members, and when I go to http://localhost/robbin/ci/index.php/site/members I can see it working but when I go to http://localhost/robbin/ci/site/members or http://localhost/robbin/ci/members I just get sent to the very root (http://localhost/xampp/). Why is that? I'd really love some help with this!
[eluser]TheFuzzy0ne[/eluser]
Welcome to the CodeIgniter forums! Is mod_rewrite enabled? If it is, first of all (if you're able to), I would recommend you add the Web root directory for your application as a virtual host. Then you can edit your hosts file, and add something like: Code: mysite.imaginarydomain.com 127.0.0.1 Then you should be able to access your site using the URL above. After that, this .htaccess file should do the trick. Code: <IfModule mod_rewrite.c>
[eluser]Unknown[/eluser]
Hey, and thank you for welcoming me Yes, mod_rewrite is enabled. You kinda lost me on adding a application as a virtual host, I'm terribly bad at this kind of stuff. Would you mind explaining it?
[eluser]TheFuzzy0ne[/eluser]
Perhaps this will help? http://austinpassy.com/tutorials/setting...windows-7/ |
Welcome Guest, Not a member yet? Register Sign In |