Multiple Routes, Single Controller Action #60654
-
I have a case where I want multiple paths to redirect to the exact same page. So I've written some code like this:
The official documentation only mentions passing paths in arrays for localization, but that isn't my case. And these paths don't have keys. Is this behavior even supported? I noticed when I generate a URL for the name, it's unpredictable which path I get back. This is what makes me think this behavior isn't supported. Should I do something like this instead?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
to have several paths, you indeed need to define multiple routes. An array of paths is only meant to be used for localized routes (where the generated URL would be deterministic thanks to the locale in that case). |
Beta Was this translation helpful? Give feedback.
to have several paths, you indeed need to define multiple routes.
An array of paths is only meant to be used for localized routes (where the generated URL would be deterministic thanks to the locale in that case).