donglv6747 2016-07-04 08:14
浏览 667
已采纳

打开链接后显示没有URL的空白页面

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:

header('Location: http://~~~~~~.com/xxx.RAR');
  • 写回答

4条回答 默认 最新

  • doujiunai2169 2016-07-04 08:44
    关注

    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: YourDomain.com"

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

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

    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title></title>
    </head>
    
    <body onLoad="history.replaceState( {} , '', '..' )">
    </body>
    
    </html>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条