Routing for beginners |
[eluser]José Mota[/eluser]
Hello, friends. I'm having a lot of trouble on routing. I have this simple rule: Code: $route['signup'] = "users/signup"; It's not working... I get a direct 404 from Apache. What should I do? Thanks for the help!
[eluser]ontguy[/eluser]
Does the 404 only happen when you use the segment "signup"? Does "users/signup" work?
[eluser]José Mota[/eluser]
"users/signup" doesn't work either. :S One thing. Do I have to put index.php/ EVERYTIME I want to create a URL? EDIT: Problem solved! I had forgotten to put "index.php/" before the URL. Sorry.
[eluser]Colin Williams[/eluser]
You can use mod_rewrite (on Apache) to remove the index.php part. See http://codeigniter.com/wiki/mod_rewrite/
[eluser]xwero[/eluser]
José you can use the site_url function from the url helper to prevent forgetting to add the index.php to your urls. |
Welcome Guest, Not a member yet? Register Sign In |