Welcome Guest, Not a member yet? Register   Sign In
URL ROUTING HELP! :D
#4

[eluser]Michael Ekoka[/eluser]
try this in your config/routes.php

Code:
$route['([0-9]+)'] = 'site_controller/client_main/$1';

In english:
- $route['[0-9]']: Right after the index.php in my url, check for a required digit.
- $route['[0-9]+']: That digit is required to successfully match this rule and may be followed by 0 or more digits. In other words there may be 1 or more digits.
- $route['([0-9]+)']: Capture all those digits, we may need them later. We will reference them as $1.
- 'site_controller/client_main/$1': if you successfully match a route with the previous requirements, redirect it to the site_controller controller, the client_main method and pass the first entry that you captured from the route as a parameter ($1).


Messages In This Thread
URL ROUTING HELP! :D - by El Forum - 01-14-2008, 06:17 AM
URL ROUTING HELP! :D - by El Forum - 01-14-2008, 06:30 AM
URL ROUTING HELP! :D - by El Forum - 01-14-2008, 06:36 AM
URL ROUTING HELP! :D - by El Forum - 01-14-2008, 10:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB