重定向301 htaccess的使用URL变量变量、重定向、htaccess、URL

2023-09-02 01:07:02 作者:回首已成往事

我搜索论坛上的答案,但并没有为我工作。

I've searched answers on the forum but didn't worked for me.

我用一句话preSS重建一个网站,并希望保持旧网址

I have rebuild an website using wordpress and want to keep old urls

我有旧网址,如:?index.php文件选项= com_content&放大器;查看=文章和ID = 51&安培; ITEMID = 67安培; LANG = FR

I have old URLs like : index.php?option=com_content&view=article&id=51&Itemid=67&lang=fr

这是我想permanantly移动到URL如:/ PRODUITS-ET-服务/康塞尔-ET-accompagnement /

that i want to move permanantly to url like : /produits-et-services/conseil-et-accompagnement/

由于重定向URL中的VAR的301没有工作..和我试试这个:

Redirect 301 didn't worked because of vars in URL.. and i've try this :

的RewriteCond%{QUERY_STRING} ^选项= com_content&放大器;查看=文章和ID = 51&安培; ITEMID = 67安培; LANG = FR $ [NC] 重写规则^ $的index.php http://solunea.fr/produits-et-服务/康塞尔-ET-accompagnement / [L,R = 301]

RewriteCond %{QUERY_STRING} ^option=com_content&view=article&id=51&Itemid=67&lang=fr$ [NC] RewriteRule ^index.php$ http://solunea.fr/produits-et-services/conseil-et-accompagnement/ [L,R=301]

在我的话,preSS htaccess,但没有任何工作。

On my wordpress htaccess but didn't worked either.

人可以帮我请??

推荐答案

确认这个规则:

RewriteCond %{QUERY_STRING} ^option=com_content&view=article&id=51&Itemid=67&lang=fr$ [NC] 
RewriteRule ^(index.php)?$ /produits-et-services/conseil-et-accompagnement/ [L,R=301,NC]

是正确的放置在顶部的现有的任何其他重写规则之前

和测试不同的浏览器,以避免301高速缓存问题。

and test in a different browser to avoid 301 caching issues.

 
精彩推荐
图片推荐