对于图像+字符串Imagefolder重写mod-rewrite规则 [英] mod rewrite Rule for Image + String to Imagefolder Rewrite
问题描述
我有我的服务器上的一些图像,这总是在飞行中产生,并要求在这里:
http://www.mydomain.com/en/images.png?domain=test.com
I have got some images on my server, which were always generated on the fly and requested right here:
http://www.mydomain.com/en/images.png?domain=test.com
他们现在缓存
http://www.mydomain.com/images/test.com.png
我想在我的htaccess下面的规则,但它不工作:
I tried the following rule in my htaccess, but it doesn't work:
重写规则^?(ZH | DE)/ images.png \域=(。*)/images/$2.png [QSA,L]
任何线索有什么错?
推荐答案
刚刚找到了解决办法:
的RewriteCond%{QUERY_STRING} ^域=(。*)$
^此行缺少赶上查询字符串
重写规则^(ZH | DE)?/ images.png $ /rating-images/%1.png [QSA]
RewriteCond %{QUERY_STRING} ^domain=(.*)$
^ this line was missing to catch the Query String
RewriteRule ^(en|de)?/images.png$ /rating-images/%1.png [QSA]
这篇关于对于图像+字符串Imagefolder重写mod-rewrite规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!