【问题标题】:How can i fix that some of my images in gallery are not showing at all?如何解决我在图库中的某些图像根本没有显示的问题?
【发布时间】:2019-02-11 16:29:15
【问题描述】:

在此处输入代码我的一些图片仅在页面刷新后显示。 在浏览器控制台中出现错误 - 获取...图像 url... 503 或 403 错误 有人可以帮我吗?

我的 htacces 代码 -

 RewriteEngine on
RewriteBase /

RewriteCond %{QUERY_STRING} ^id=8$
RewriteRule ^albumgallery.php$ https://www.website.com/blabla? [L,R=301]
RewriteRule ^blabla/?$ /albumgallery.php?id=8&loop=no [L]    

RewriteCond %{THE_REQUEST} ^.*/index\.php 
RewriteRule ^(.*)index.php$ /$1 [R=301,L] 

RewriteCond %{THE_REQUEST} ^.*/index 
RewriteRule ^(.*)index$ /$1 [R=301,L]    

RewriteCond %{ENV:HTTPS} !on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

#Exclusion
RewriteCond %{REQUEST_URI} !^/(images|images/.*)$
#End exclusion

这是图片的代码

<a title="<?php echo $gimagenonumber ?>" href="images/gupload/<?php echo $gimage; ?>" data-lightbox="ourClass"><img alt="<?php echo $gimagenonumber ?>" title="<?php echo $gimagenonumber ?>" class="horizontals" src="/images/gcatch/<?php echo $gimage ?>"/></a>

在控制台中是 - 加载资源失败:服务器响应状态为 503 () - 对于所有已卸载的图像

我还注意到,当您连续按几次 ctr+f5 时,它会在整个网站上运行

【问题讨论】:

  • 尝试发布一些代码或截图
  • 我确实发布了一些代码

标签: php html refresh


【解决方案1】:

你在本地机器上工作吗?请检查您的 .htaccess 文件或将您的 pitures 移动到子文件夹中

【讨论】:

  • 向我们展示您的 .htaccess 文件内容
【解决方案2】:

试试这个 之后

RewriteEngine On
RewriteBase /

添加

#Exclusion
RewriteCond %{REQUEST_URI} !^/(images|images/.*)$
#End exclusion

【讨论】:

  • 你能看一下代码吗?我更新了它......在我看来 - 页面在所有图像加载之前完成加载
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-09-24
  • 1970-01-01
  • 2017-05-10
  • 1970-01-01
  • 2014-12-08
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多