【发布时间】:2014-01-06 12:33:19
【问题描述】:
我有一个旧页面,用于根据查询字符串显示多个产品。我想将带有查询字符串的 url 重写为与旧 url 将被重写到的静态页面不同的静态页面。
RewriteRule ^old.php$ new.php
RewriteRule old.php?product=10 different.php [R=301,L]
在这种情况下,old.php 被重写为 new.php。但是 old.php?product=1O 被重写为 new.php?product=10 而不是 different.php
【问题讨论】:
标签: php regex apache .htaccess mod-rewrite