问题描述
有没有什么办法htaccess的转换:
is there any way in htaccess to convert :
theimages /库/ tour_ preVIEW /布拉尼-Castle_7.jpg F = PNG和放大器; W = 250安培; H = 190安培;远= 0
theimages/library/tour_preview/Blarney-Castle_7.jpg?f=png&w=250&h=190&far=0
到
phpThumb / phpThumb.php?SRC = <一个href="http://example.com/library/tour_$p$pview/Blarney-Castle_7.jpg&f=png&w=250&h=190&far=0" rel="nofollow">http://example.com/library/tour_$p$pview/Blarney-Castle_7.jpg&f=png&w=250&h=190&far=0
phpThumb/phpThumb.php?src=http://example.com/library/tour_preview/Blarney-Castle_7.jpg&f=png&w=250&h=190&far=0
所以基本上:1)theimages被替换为phpThumb / phpThumb.php?SRC = http://example.com
so basically :1) the 'theimages' is replaced by phpThumb/phpThumb.php?src=http://example.com
2)和?在原来的链路将由一个&安培取代;
2) and the ? in the original link will be replaced by a &
非常感谢
推荐答案
您可以在 DOCUMENT_ROOT /的.htaccess
文件中使用此code:
You can use this code in your DOCUMENT_ROOT/.htaccess
file:
RewriteEngine On
RewriteBase /
RewriteRule ^theimages/(.+)/?$ phpThumb/phpThumb.php?src=http://example.com/$1 [L,NC,QSA,NE]
这篇关于使用htaccess的其他域读取图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!