How can I redirect to a parameter if the parameter doesn't exist in the old URL?
I need to redirect:
/labels/{name} to /label/{id}/{name}
I could use the name from the old URL to get the ID from the database inside a controller, but I don't understand Creating your own redirector chapter. Does this mean to create a controller?
Can you please give an example of a custom controller to select from the database?
How can I redirect to a parameter if the parameter doesn't exist in the old URL? I need to redirect:
/labels/{name}
to/label/{id}/{name}
I could use the
name
from the old URL to get the ID from the database inside a controller, but I don't understandCreating your own redirector
chapter. Does this mean to create a controller?Can you please give an example of a custom controller to select from the database?