[Solved] Hiding URLs from the location bar


You can use the javascript history.pushState() here

history.pushState({},"Some title here","/")

For example, on http://yourwebsite.com/secretlink.html, after the JS runs, the URL bar will show http://yourwebsite.com/ without having refreshed the page1. Note that if the user refreshes the page they will be taken to http://yourwebsite.com/ and not back to the secret link.

You can also do something like history.pushState({},"Some title here","/hidden.jsp"), so that if the user refreshes the page you can show them an error page that tells them to find the secret link and open it again.

1. If you pushState() some other domain than your own, a refresh will happen so this cannot be abused to phish sites

3

solved Hiding URLs from the location bar