Can't get routes to work how I want it to |
[eluser]ElliotReevey[/eluser]
I started work on my first every project using Codeigniter and hoping you guys can help me out. I have a controller called campaign which has an index() and newcampaign() function which all works fine using the following urls http://website.com/campaign and http://website.com/campaign/newcampaign. However I am looking to extend this so that anything after http://website.com/campaign which is NOT equal to newcampaign routes to the viewcampaign() function for example http://website.com/campaign/campaign1. I have so far been working on the routes.php file in the config folder and have tried: Code: $route['campaign/^((?!newcampaign)\S*)'] = "campaign/$1"; However when I go to say http://website.com/campaign/campaign1 I get a 404 not found. Can anyone shed any light on how to achieve what im looking for? Cheers |
Messages In This Thread |
Can't get routes to work how I want it to - by El Forum - 11-03-2010, 02:46 PM
Can't get routes to work how I want it to - by El Forum - 11-03-2010, 03:40 PM
Can't get routes to work how I want it to - by El Forum - 11-03-2010, 03:59 PM
Can't get routes to work how I want it to - by El Forum - 11-04-2010, 04:07 AM
Can't get routes to work how I want it to - by El Forum - 11-04-2010, 04:10 AM
Can't get routes to work how I want it to - by El Forum - 11-04-2010, 06:02 AM
|