【发布时间】:2015-12-16 11:21:39
【问题描述】:
所有图片都在上传文件夹中。但它没有显示在前端。如果我直接打开链接,则表示找不到该图像的页面。
为什么会这样?有什么想法吗?
注意:没有安装新插件。
.htaccess文件代码:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# STRONG HTACCESS PROTECTION</code>
<Files ~ "^.*\.([Hh][Tt][Aa])">
order allow,deny
deny from all
satisfy all
</Files>
# protect wp-config.php
<files wp-config.php>
Order deny,allow
Deny from all
</files>
#disable hotlinking of images with forbidden or custom image option
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?wpbeginner.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?feeds2.feedburner.com/wpbeginner [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]
# protect from sql injection
Options +FollowSymLinks
RewriteEngine On
#RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
#RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
#RewriteRule ^(.*)$ index.php [F,L]
【问题讨论】:
-
您最近是否将您的网站从其他主机/环境/服务器上迁移?
-
不在与开始时相同的位置
-
..而且图像从未显示?还是突然消失了?
-
突然消失
-
嗯 :-).. 我的朋友,如果他们突然消失了,而您没有采取任何明显的行动 - 我建议您使用 FTP 并搜索它们!
标签: wordpress .htaccess security