.htaccess将图像文件夹重定向到另一个域 [英] .htaccess Redirect images folder to another domain
本文介绍了.htaccess将图像文件夹重定向到另一个域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
好的,所以我有2个域
site1.com/images/(所有图像)
ok so i have 2 domains site1.com/images/ (all images)
我需要重定向imgages链接site1.com/ images /到site2.com/images/,这样当
和exp时。将调用site1.com/images/i.jpg,它将查看site2.com/images/1.jpg并找到它。
。这是网站的基本副本,我不想前后移动图像。
and I need to redirect the imgages link site1.com/images/ to site2.com/images/ so that when and when exp. site1.com/images/i.jpg is called it will look at site2.com/images/1.jpg and will find it. .this is basic duplicate of the site and i don't want to move images back and forward.
推荐答案
将您的.htaccess放在site1.com上
Put in your .htaccess on site1.com
Redirect permanent /images http://sites2.com/images
这篇关于.htaccess将图像文件夹重定向到另一个域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文