Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess 如何修复此重定向错误_.htaccess_Mod Rewrite_Redirect_Http Redirect - Fatal编程技术网

.htaccess 如何修复此重定向错误

.htaccess 如何修复此重定向错误,.htaccess,mod-rewrite,redirect,http-redirect,.htaccess,Mod Rewrite,Redirect,Http Redirect,当我上传任何图像并试图打开它时,imgslink.biz就是我的网站,它会给我404错误imgslink.biz/img-53fc4f024b830.html。这是我的.htaccess文件代码 RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://(.+\.)?imgslink\.biz/ [NC] RewriteCond %{HTTP_REFERER} !^$ RewriteRule .*\.(jpe?g|gif|bmp|png)$ no

当我上传任何图像并试图打开它时,imgslink.biz就是我的网站,它会给我404错误imgslink.biz/img-53fc4f024b830.html。这是我的.htaccess文件代码

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?imgslink\.biz/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ nohotlink.gif [L]
<Files ~ "\.(php|sql|php3|php4|phtml|pl|py|jsp|asp|htm|shtml|sh|cgi)$">
  order allow,deny
  deny from all
</Files>
重新编写引擎打开
重写cond%{HTTP_REFERER}^http://(.+\)?imgslink\.biz/[NC]
重写cond%{HTTP_REFERER}^$
重写规则。*\(jpe?g | gif | bmp | png)$nohotlink.gif[L]
命令允许,拒绝
全盘否定

谢谢

打开Web服务器错误日志(通常为/var/log/nginx/error.log或/var/log/apache2/error.log(取决于使用的Web服务))。找不到错误日志您应该能够找到mod rewrite指令的好例子,可以根据需要执行。将他们的代码与你的代码进行比较,看看可能出了什么问题。仍然会出现此错误这里有人帮助我吗?