[英]Can I hide an image path on asp.net page without http Handler?
I have many static images under a directory in my site structure, and I'm not concerned with hotlinking or copy-protecting the images. 我的网站结构中的目录下有很多静态图像,我不关心图像的热链接或复制保护。 For a myriad of reasons, what I need to do is not show the image path on the site (or show a fake one).
由于种种原因,我需要做的是不在网站上显示图像路径(或显示虚假路径)。
Is there any way to do this without resorting to an http handler or a worker asp.net page? 有没有办法做到这一点,而不诉诸http处理程序或工作者asp.net页面?
You could use URL Rewritting . 您可以使用URL重写 。 Doing it yourself would require you to implement a custom handler but there are third party options already available you could try.
自己动手将要求您实现自定义处理程序,但您可以尝试使用第三方选项。
I would guess however that a simple http handler implemented as an ASHX endpoint would probably be the easiest option. 但我猜想,作为ASHX端点实现的简单http处理程序可能是最简单的选择。
您可以使用通用的ASHX处理程序 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.