Is it possible to rename routes?
-
I did a search which brought up this topic. Considering it was posted almost a year ago I'm wondering if there's now an easier way to rename routes?
For example, I'd like to rename:
Recent to New
example.com/recent to example.com/newUsers to Members
example.com/users to example.com/members -
@a_5mith I just tried the navigation tab, the menu wording changed OK but it resulted in a 404 when I visted example.com/members and example.com/new
-
Mmm... unfortunately I think we thought of this too late, as all existing references to internal links rely on the route names not changing...
e.g. If there's some backend code that sends a user to
/category/4
when they do something, bad things will happen if the/category
path was renamed to/forum
, since it's hardcoded to/category
But... you could have a play around with nginx to rewrite requests for the new route to the old...
Edit: Yep, works.
location / { rewrite ^/new/?$ /recent break; }
Then you could change all references to
/recent
in templates to/new
...