Welcome Guest, Not a member yet? Register   Sign In
Routes: Regexpt exclusion
#1

[eluser]IkoTikashi[/eluser]
Hello forum,

I'm trying to setup routes on my CI-project (a little photoblog). I've succeeded in setting up this route:

Code:
$route['([a-z0-9]+)/([a-zA-Z]+)'] = "photo/index/$1/$2";

which makes my photo-urls look like "http://myhost/CATEGORYNAME/PHOTONAME".

Now I wanted to create some administration-pages in a subfolder called "admin". For those to work I need to exclude "admin" from my route. I tried

Code:
$route['(^admin/)([a-z0-9]+)/([a-zA-Z]+)'] = "photo/index/$1/$2";
, but this gives me a "404 Page Not Found" on my photo-detail-pages (admin-pages do work however). I guess it's my complete noobness with regular expressions - can anybody push me in the right direction please?


Messages In This Thread
Routes: Regexpt exclusion - by El Forum - 05-25-2008, 04:59 AM
Routes: Regexpt exclusion - by El Forum - 05-25-2008, 05:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB