新配置的环境,安装完成后部分图片资源无法加载
By tytion
at 2017-07-04
0人收藏 • 3495人看过
首页图片资源都出不来,查看REWRITE规则好像未发现问题,单独访问图片资源也无法加载
后来在静态资源中注释了图片的缓存,依然无果……
贴出.htaccess
# errordoc
ErrorDocument 404 /404.php
<IfModule mod_rewrite.c>
#强制重定向到带www的顶级域名
RewriteEngine On
RewriteCond %{HTTP_HOST} ^94cb.com$ [NC]
RewriteRule ^(.*)$ https://www.94cb.com/$1 [L,R=301]
#For SSL
#RewriteCond %{HTTP_HOST} ^www.94cb.com$ [NC]
#RewriteCond %{SERVER_PORT} 80
#RewriteRule ^(.*)$ https://www.94cb.com/$1 [L,R=301]
#RewriteCond %{HTTP_HOST} ^m.94cb.com$ [NC]
#RewriteCond %{SERVER_PORT} 80
#RewriteRule ^(.*)$ https://m.94cb.com/$1 [L,R=301]
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
RewriteBase /
RewriteRule ^.git - [F,L]
RewriteRule ^controller - [F,L]
RewriteRule ^docker_resources - [F,L]
RewriteRule ^library - [F,L]
RewriteRule ^service - [F,L]
RewriteRule ^view - [F,L]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
# Expire static files after a month in the client's cache
# http://httpd.apache.org/docs/2.4/mod/mod_expires.html
<IfModule mod_expires.c>
# enable expirations
ExpiresActive On
ExpiresByType text/javascript A604800
ExpiresByType application/x-javascript A604800
ExpiresByType text/css A604800
ExpiresByType application/x-shockwave-flash A2592000
#ExpiresByType image/png A2592000
#ExpiresByType image/gif A2592000
#ExpiresByType image/jpeg A2592000
#ExpiresByType image/x-icon A2592000
</IfModule>
- 登录后方可回帖
回复#1 @tytion :
开F12,看图片返回的状态码是?
回复#3 @tytion :
检查你安装的chrome extension吧,应该是被拦截了。
回复#4 @lincanbin :
用Safari问题依旧…xingzhe.in
回复#5 @tytion :
你的logo是原来程序里带的?
回复#6 @lincanbin :
是的,一开始我不小心从github上直接下了tar.gz的安装包,安装上了图片资源显示正常,不过后来发现是5.6.1版本,因为我直接在最后一个版本那里下的。。。然后又直接从代码库里打包拉下来,重置了虚拟空间,然后上传程序,无论怎么捣鼓就都是变成这个样了。。。
回复#8 @lincanbin :
好的,我联系一下,感谢!