Routing for beginners

[eluser]José Mota[/eluser]
Hello, friends.

I'm having a lot of trouble on routing. I have this simple rule:
$route['signup'] = "users/signup";
I have a controller named Users with a function called signup.

It's not working... I get a direct 404 from Apache. What should I do?

Thanks for the help!

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

José you can use the site_url function from the url helper to prevent forgetting to add the index.php to your urls.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.