# Duplicate user URLs

**URL:** <https://meta.discourse.org/t/duplicate-user-urls/286457>\
**Category:** Product Support\
**Created:** [November 23, 2023, 5:29pm UTC](https://meta.discourse.org/t/duplicate-user-urls/286457 "2023-11-23T17:29:32Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)\
**Post date:** [November 25, 2023, 3:20pm UTC](https://meta.discourse.org/t/duplicate-user-urls/286457/9 "2023-11-25T15:20:02Z")

</div>

> [@Jagster](#):
>
> if an url is case-insensitive should there be then only one url? There would be then some regex-magic.

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

```javascript
// 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"));

```

> [@Jagster](#):
>
> And if there is different urls based of caps on/off would it be sign of case-sensitive situation?

Yes, for example:

```javascript
// 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"));

```

---

_[View the full topic](https://meta.discourse.org/t/duplicate-user-urls/286457)._
