Can I hide an image path on asp.net page without http Handler?

[亡魂溺海] 提交于 2019-12-07 13:02:31

问题


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?


回答1:


You could use URL Rewritting. 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.




回答2:


You could use a generic ASHX handler for this.



来源:https://stackoverflow.com/questions/2676051/can-i-hide-an-image-path-on-asp-net-page-without-http-handler

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!