[eluser]dippy[/eluser]
[quote author="BrianDHall" date="1257387164"][quote author="dippy" date="1256614431"]I have the following in my routes:
Code:
$route['services/:any'] = "services/section";
so i can goto a url like this: 'services/towing' and the php will pull that sections info into the page view.
and then i also want to have a url like the following: 'services/towing/company-name' - and have that route to another function in the services controller to pull that's company info.
can this be done?
when i tried to do this all i kept getting was the section.
so i added this for a temp. solution.
Code:
$route['search/:any'] = "services/search";
but id like to have it under services/section in the url.
any suggestions?[/quote]
Code:
$route['services/(*+)' = "services/section/$1";
So services/towing would remap to services/section/towing, and services/towing/company would reroute to services/section/towing/company[/quote]
i get the following when i replace the route with the following.
Code:
$route['services/(*+)' = "services/section/$1";
Code:
A PHP Error was encountered
Severity: Warning
Message: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 11
Filename: libraries/Router.php
Line Number: 281