כתובת URL לפרופיל משתמש ידידותי

סיכום מבוסס בינה מלאכותית

A user yhh9xdq7d asks if it’s possible to create friendly user profile URLs without the /u/ prefix (e.g., domain.com/username), similar to how /faq works. merefield notes that /u/ URLs already exist (e.g., meta.discourse.org/u/merefield) and jokes about the user’s unfriendly username. yhh9xdq7d clarifies they want to remove /u/, prompting merefield to suggest prioritizing friendly usernames and possibly modifying Rails routes via a plugin — but warns of conflicts if users choose reserved names like faq, tos, or privacy. yhh9xdq7d asks if reserved names are already blocked, to which merefield provides a link to Discourse’s routes.rb file and suggests learning Rails routing and plugin development. michaeld questions the benefit of removing /u/ and raises concerns about future route conflicts. Zup proposes a solution: reserve top-level paths for usernames and move system routes under a prefix like /i/ (e.g., domain/i/faq), improving usability while avoiding conflicts. The discussion balances usability desires with technical and architectural constraints in Discourse.

Is there any community owner who uses aliases for user linka? For example: domain.com/username.

Maybe in the same way that /rules leads to /faq.

Is it a problem to create aliases for users? Does it have any problems with the structure of Discourse?

This already exists? e.g.:

https://meta.discourse.org/u/merefield/

btw, your username isn’t especially friendly? :sweat_smile:

https://meta.discourse.org/u/yhh9xdq7d/

Samuel L Jackson Reaction GIF by Coming to America

I mean without /u/ in the url

The /u/ is unfriendly? I would prioritise friendly usernames first :slight_smile:

You could try extending the Rails router config in a plugin, I guess, but I’m not sure it’s worth the effort?

But what if someone decides to call themselves tos, privacy or faq?!

Isn’t there a file for reserved names that nobody can create accounts with? Like admin, faq and stuff like that?

Here’s the file you need to override. Try it out:

discourse/routes.rb at main · discourse/discourse (github.com)

If you are not used to writing Rails and plugins, take a look at:

And what if Discourse needs to add a new route and you already have a user named like that?

What is the benefit of leaving out the /u/ part?

There is ease of use for the user if it’s simply domain/username.

Could routes be categorized in the way that usernames are currently? For example: domain/i/faq, domain/i/tos, domain/i/privacy, and top-level would be reserved for usernames: domain/username?