Duplicate user URLs

Hello,
The users on my DIscourse forum are showing once in the Users list in the settings menu. However, each user has a duplicate url, for example:

How do I remove the redundant URL?

Hello, welcome back. :wave:

I believe this is the expected behavior. The username in this URL is not case-sensitive.
Here on meta LegacyTheTeam, legacytheteam or LeGacYTheTeAm will redirect to LegacyTheTeam.

I can’t be wrong, but I don’t think there is a setting for that. :thinking:
Would you mind sharing why you want to require usernames to be case-sensitive here?

3 Likes

Hello! I don’t need the URLs to be case sensitive. I just need one of them and at the moment, there are two of the same URL for each user, one with capitalized names and one without. How do I delete one of the URLs?

The URLs are “duplicated” because they are case-insensitive. It sounds like you want them to be case-sensitive, although you’re saying you don’t want that, which is confusing.

1 Like

Hi,
I don’t mean to be confusing! For some reason, there are 2 URLs for each user on the forum. I did not create them intentionally. How do I delete one of them so there is only one URL for each user?

I think you need to clarify what you mean by this.

Where on your forum are “2 URLs” for each user appearing? There is a visual duplication?

2 Likes

I know, I’m going off topic, kind of, but I’m curious and as an pure end-user I would like to understand basics: if an url is case-insensitive should there be then only one url? There would be then some regex-magic. And if there is different urls based of caps on/off would it be sign of case-sensitive situation?

There are not two, there are many, one for each case of each letter. Do you want them to ask redirect to the desired case? There is no way to delete the urls.

How is having the url be far insensitive a problem?

1 Like

Well the easiest implementation (Using regex since you mentioned it) off the top of my head would be:

// Using express here, first thing that came to mind
const express = require('express');
const app = express();
app.get("/Some-URL", (req, res) => {
    res.send("Hi");
});
app.use((req, res) => {
    if (/^\/some-url$/i.test(req.url)) {
        res.redirect("/Some-URL");
    }
});
app.listen(() => console.log("Server Running"));

Yes, for example:

// Using express here, first thing that came to mind
const express = require('express');
const app = express();
app.get("/Some-URL", (req, res) => {
    res.send("Hi");
});
app.get("/some-url", (req, res) => {
    res.send("Lowercase, eh?");
})
app.listen(() => console.log("Server Running"));