<Directory "D:/java/xx/picphoto/">
Options SymLinksIfOwnerMatch
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://localhost.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|JPG)$ http://www.xx.cn/images/xx.gif [R,NC]
</Directory>
Options SymLinksIfOwnerMatch
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://localhost.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|JPG)$ http://www.xx.cn/images/xx.gif [R,NC]
</Directory>
本文介绍了一种通过配置Apache服务器的.htaccess文件来限制特定目录下图片资源的外部直接访问的方法。具体而言,该配置使用了RewriteEngine、RewriteCond和RewriteRule指令来实现仅允许来自本地服务器的请求访问这些图片。
1936

被折叠的 条评论
为什么被折叠?



