【发布时间】:2012-07-25 17:50:04
【问题描述】:
我已经搜索过了,但找不到可行的解决方案...
我已经将一个站点从 asp.net 移植到 php。按照指示,我将内部链接保留为 .aspx 用于 seo。对于 wordpress 之外的静态页面,没有查询字符串,我可以正常工作:
RewriteEngine on
RewriteRule ^testimonials.aspx$ /testimonials.php [NC,R=301]
但是,我有一些包含查询字符串的链接...这些链接现在必须指向当前在 wordpress 安装中的页面。我怎样才能得到
myawesomesite.com/catalog.aspx?n=My%incredible%20product
重定向到
myawesomesite.com/catalog/my-new-incredible-product/
与
myawesomesite.com/catalog.aspx?n=My%other%20product
重定向到
myawesomesite.com/catalog/my-new-other-product/
等...(在目标中,“目录”是安装 wordpress 的目录)
我尝试了各种方法,但不是专家。我知道我需要做一些事情来让 apache 捕获查询字符串...
【问题讨论】:
标签: asp.net wordpress .htaccess rewrite