在锚标记隐藏网址 [英] Hide url in anchor tag

查看:123
本文介绍了在锚标记隐藏网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

abcv

如果我点击这个它显示完整的地址。问题是共享的路径和任何人都可以破解这条道路。有什么办法不显示在浏览器这整个路径,并只显示abc.jpg的。

If i click this it's showing complete address. Problem is the path is shared and anyone can hack this path. Is there any way to not to show this entire path and only show abc.jpg in browser.

推荐答案

您可以使用以下方法


  1. 在数据库中存储的图像,并使用的HttpHandler 来检索和显示它们。结果
    作为额外的precaution你可以把当前日期时间为加密URL参数,以验证它是否是一个特定时期内一个新的请求,说10分钟。你可以参考这篇文章提到的HttpModule实现 -
    <一href=\"http://www.aspdotnet-suresh.com/2015/07/display-images-from-database-in-gridview-in-aspnet-using-handler-ashx-file-in-csharp-vbnet.html\" rel=\"nofollow\">display-images-from-database-in-gridview-in-aspnet-using-handler-ashx-file-in-csharp-vbnet

  1. Store the images in the database and use HttpHandler to retrieve and display them.
    As additional precaution you may pass current DateTime as encrypted url parameter to verify whether it is a fresh request within a specific time period say 10 minutes. You may refer this article for reference to HttpModule implementation
    display-images-from-database-in-gridview-in-aspnet-using-handler-ashx-file-in-csharp-vbnet

作为另一种方法,你可以实现的临时网址,因为这里所描述的生成临时下载的URL

As another approach you may implement the concept of Temporary URLs as described here Generating Temporary Download URLs

这篇关于在锚标记隐藏网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆