Replies: 3 comments 1 reply
-
Your aliases should probably redirect and not result in multiple URLs doing the same thing... it's generally considered bad to have duplicate content on the web w/o redirects to the canonical URL. In any case, this is something you can easily implement in your own app if you want it. |
Beta Was this translation helpful? Give feedback.
-
My code was something I created on the spot. I haven't taken a comprehensive look at it, as you mentioned, duplicate content on the web. I mean, would it be better if I made them all redirect back to the main route? |
Beta Was this translation helpful? Give feedback.
-
You can already achieve your original ask by simply adding additional `URL rules to an endpoint: @app.route("/foo")
@app.route("/bar")
def hey():
return "hello world" Yes, it’s better to have a single, canonical URL for a page. It’s highly unusual to have a single, static page accessible from multiple URLs. |
Beta Was this translation helpful? Give feedback.
-
I think it would be cool if there were built-in aliases for routes, for example:
It might be useless to some, but I don't. I think it would be useful to allow people to define multiple aliases for one route. It is possible as of now using this code I made:
Beta Was this translation helpful? Give feedback.
All reactions