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"));