Welcome Guest, Not a member yet? Register   Sign In
excluding url into routes
#1

[eluser]abmcr[/eluser]
I have an routes.php file as
Code:
$route["{$lang}vivere/(.*)"] = "vivere/index/$2";
for managing url as
Code:
http://host/application/fr/vivere/mypage

i want excluding from this rule an url as

Code:
http://host/application/fr/vivere/pag/anotherpage

and i have set into the router
Code:
$route["{$lang}vivere/(.*)"] = "vivere/index/$2";
$route["{$lang}vivere/pag/(.*)"] = "vivere/pag/$2";

but, obvious, the first rule rewrite the second: it is possible to exluding the second url? Thank you
#2

[eluser]xwero[/eluser]
The routes are checked from top to bottom so all you have to do is switch the two routes and it will work fine
#3

[eluser]abmcr[/eluser]
Thank you: a very simple solution....




Theme © iAndrew 2016 - Forum software by © MyBB