将图片重定向到发布网址

时间:2017-07-22 19:29:28

标签: php redirect gd

当您点击"在新标签中打开图片时,我在Google图片中看到了一些网站"它会重定向到原始帖子的网址。

我的网站上有很多用php gd创建的图片,这些图片从帖子中获取数据并创建图片,网址与此类似:

example.com/img/(数后-ID) - 一些-text.jpg

和帖子

example.com/post/(数后-ID)

当有人在新标签中打开图片时,有没有办法将图片重定向到原始帖子?

感谢

2 个答案:

答案 0 :(得分:0)



  %sql select Week as Date,Campaign Type,Engagements,Country from Data order     by Date asc

/* add a little bottom space under the images */
.thumbnail {
	margin-bottom:7px;
}




答案 1 :(得分:0)

根据我的理解,这是一个解决你的问题的片段:



<a href="http://example.com/imagelink" target="_blank"> <!-- target _blank opens in new tab-->
  <img src="http://example.com/image.extension">
</a>
&#13;
&#13;
&#13;

相关问题