These are two different controller/actions with different parameter names. However, it always defaults to the first rule, whatever it may be. Is there a way to tell Yii how to differentiate between the two rules based on same number of parameters/arguments but different parameter names? Or does it HAVE to be different number of parameters for each controller/action?
It’s up to the regular expressions that you use for the url manager rules.
If the given url falls into the 1st pattern, then it will be routed to the 1st route, without checking the 2nd rule and its pattern. So, try to come up with the pattern that is only applicable to "country" or "airline", then you can solve the problem.
Thank you for your advice. I’m not very good at regular expressions so can you please help me a bit further and suggest a regular expression that could work. Both my controller/actions expect, for example, United States for abc/index and Air Blue for xyz/view. One argument for both actionIndex and actionView functions in different controllers.
Both ‘<lang>/<airline:.?>’ and '<lang>/<cnty:.?>’ have exactly the same regular expression pattern, so ‘country/index’ will never have the chance to be applied.
For example, if you are sure that all the air lines have ‘Air’ or ‘Aero’ in their names, then you could do something like this: