http防盗链接:加了.htaccess文件后页面访问提示500,http.conf文件配置修改了

来源:2-5 http防盗链

wymwym

2017-04-27 19:38

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} .*\.(jpg|jpeg|png|gif) [NC]
RewriteCond %{HTTP_REFERER} !^ http://localhost/.*$[NC]
RewriteRule .*error.jpg

网页报错内容:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at admin@example.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.


写回答 关注

4回答

  • 琉忆
    2018-05-25 22:06:47

    RewriteRule .*error.jpg 是这里错了,要注意 .*和error.jpg中间有个空格:RewriteRule .* error.jpg 

  • yxcm
    2018-01-05 14:54:30

    我也是这个错,很蒙蔽啊

  • Weicong
    2017-11-22 14:47:42

    记得是放在根目录下 而不是子文件的目录下

  • 残缺折子戏
    2017-04-30 10:54:51

    apache 500报错 一般都是程序代码出现了错误

PHP中的HTTP协议

PHP视频教程从PHP的角度深度解析HTTP协议知识,例如post、和get请求

33411 学习 · 54 问题

查看课程

相似问题