http://www.example.com/assets/thumb/index.php?src=/uploads/images/38/images/2/img_3761.jpg&w=880&h=587&zc=1
到
http://www.example.com/assets/thumb/index.php?src=/uploads/images/38/images/2/img_3761.jpg&w=1200&h=900
我尝试:
RewriteCond %{QUERY_STRING} ^assets/thumb/index.php?src=$1&w=$2&h=$3&zc=$4
RewriteRule ^/?(assets/thumb/index.php)?$ assets/thumb/index.php?src=$1&w=$2&h=$3
我不是服务器规则的专家。 谢谢
的Al。
答案 0 :(得分:0)
您可以尝试以下规则:
RewriteCond %{QUERY_STRING} ^src=(.+)&w=(\d+)&h=(\d+)&zc=(\d+)$ [NC]
RewriteRule ^assets/thumb/index\.php$ /assets/thumb/index.php?src=%1&w=1200&h=900 [R=301,L]
希望这能帮到你!