.htaccessdynamicimageurl重写

我想使用htaccess将所有产品图像redirect到外部网站。 然而,我不知道如何使用dynamicvariables,图像url如下所示:

httpz://localhost/oc1505/image/80×80-10035.jpg

其中80×80是高度和宽度,10035.jpg是到外部图像的链接。 所以在这种情况下,我想redirect到一个像这样的url:

http://www.othersite.nl/imgs/prd/ kln /10035.jpg

如果源图像是150×150-10035.jpg,它应该redirect到。

http://www.othersite.nl/imgs/prd/ std /10035.jpg

我还有其他一些我想redirect的格式。

如果有人能帮我一点,我会很高兴。

尝试这个:

RewriteEngine on RewriteRule 80X80-(.*)$ https://www.othersite.nl/imgs/prd/kln/$1 RewriteRule 150x150-(.*)$ https://www.othersite.nl/imgs/prd/std/$1