【发布时间】:2013-03-29 13:34:10
【问题描述】:
我正在尝试将旧的 Google 缓存链接重定向到我们的新网站。所以它在我的正则表达式编辑器中有效,但在我的 htacess 文件中无效?
第一条规则似乎有效,但第二条规则无效。我在规则上方留下了示例。
# Legacy site redirects
# For homes home and search:
# www.site.ie/results_lost_found.html?search_type=lost_found&ad_type=&location_id=&x=31&y=12
RewriteRule ^results_lost_found|results_home(.+)search_type=lost_found(.*)$ lost_found [NC,R=301,L]
# www.site.ie/results_home.html?search_type=for_home&pet_type_id=&location_id=&x=14&y=10
RewriteRule ^results_lost_found|results_home(.*)search_type=for_home(.*)$ for_homes [NC,R=301,L]
【问题讨论】:
标签: regex mod-rewrite seo