【发布时间】:2016-12-16 21:14:11
【问题描述】:
我的 apache htaccess 文件需要一些 301 重定向。旧的 url 在末尾包含变量并具有如下结构:
/furniture-248/category/570-shelves.html?lang=en
/all-products/furniture-248/shelves.html?page=2&lang=en
/store/product/asearch.html?path=7_632&lang=en&Itemid=284
新的 url 不包含这种性质的参数,并且只是以下形式:
main-cat/subcat/sale.html
我在 htaccess 文件中尝试了一个常规的 301 重定向,它适用于没有参数的 url,但那些包含 ?lang=en 的 url 根本不起作用。
这是我正在尝试的:
Redirect 301 /furniture-248/category/570-shelves.html?lang=en http://www.domain.com/shelves.html
如果您能提供任何帮助和建议,我将不胜感激。
在此先感谢
【问题讨论】:
-
也显示你的 htaccess
-
是的,需要看看你是如何尝试这样做才能提供修复。
-
编辑帖子以显示我正在尝试的内容
-
谢谢,我添加了答案。
标签: apache .htaccess redirect mod-rewrite