Aiden Stewart Aiden Stewart - 1 year ago 74
PHP Question

Show a blank_page with no URL after open a link

I googled my question but it seems there is nothing about it on whole internet!

I have a html link that goes to a php file.That php file redirect to link for downloading a RAR file.But after download i have a page with my php file address that i dont want to be seen.i want to add another header to the php file that redirect to a blank_page that has nothing even a url.

Actually, i see many websites that using this trick,

is there any way to do that with php or js or even jquery and ... ?

this is my php file code:


Answer Source

You can use this simple JavaScript snippet to edit the browser history + url. The following code will set the URL to the parent domain. "Example:"

history.replaceState( {} , '', '..' );

You can add this snippet to the onLoad Event of the page.

<!doctype html>
<meta charset="utf-8">

<body onLoad="history.replaceState( {} , '', '..' )">

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download