首页 > 解决方案 > 文件名中包含图像计数的多个图像文件的 HTAccess 速记重定向?

问题描述

我试图找到一种速记方法来从旧域中捕获许多图像点击:

http://www.old-domain.com/images/real-estate-nn.jpg to
http://www.new-domain.com/plot/images/real-estate-nn.jpg

nn = 01 到 29

RewriteCond %{REQUEST_URI} ^real-estate-([0-9]+)$ [NC]
RewriteRule ^(.*)$ http://www.new-domain.com/plot/images/real-estate-$1.jpg [R=301,NE,NC,L]

我究竟做错了什么?

谢谢你。

标签: .htaccessredirectmod-rewrite

解决方案


推荐阅读