问题描述
我们有一个被命名为thumb.jpg缩略图处理脚本?SRC =
We have a thumbnail processing script which is named thumb.jpg?src=
当在html code产生了大拇指,他们都命名一样的,所以当我们的CDN拉图像缓存,它们不是唯一的。
When the thumbs are generated in the html code, they are all named the same so when our CDN pulls the images to cache, they are not unique.
我希望能够给每个给他们一个独特的名字,但他们在htaccess的重写,使他们仍然使用thumb.jpg脚本
I'd like to be able to give them each a unique name, but have them rewritten in the htaccess so that they are still using the thumb.jpg script
下面是我认为应该工作,但它只是心不是为我工作。
Here is what I think should work, but it simply isnt working for me.
重写规则拇指([A-Z0-9 - ] +)。(。*)JPG thumb.jpg $ 2
RewriteRule thumb([a-z0-9-]+).jpg(.*) thumb.jpg$2
任何想法?
推荐答案
添加这一功能强大的规则:
Add this robust rule:
RewriteRule thumb(.*)\.jpg$ thumb.jpg?src=$1
这篇关于mod_rewrite的动态图像名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!