Masking a url with a url shortener

1.3k views Asked by At

I need to mask number of URLs with a short URL link that does not reveal location of the web page in the address bar.

Example: mywebsite.com/content-123

Masked URL: surl.us/ae12sw

Clarification: I am not looking for redirects like traditional URL shorteners (bit.ly) that would redirect user to long URL. I need the short URL to remain in the address bar masking the actual URL. But the page would display the content from original website.

1

There are 1 answers

0
Lavesh Pillay On

Not sure if this will help but maybe try adding something like this to the JavaScript of each page

    history.pushState("mywebsite.com/content-123", "Example Site", "surl.us/ae12sw");