jeudi 25 juin 2020

Url rewriting redirect 301 old to new website

a small problem with redirections from my old site to the new one. I was helped for rewriting, I try to make it out that if the user arrives on example.ch/ or example.ch/fr he is redirected to my new site. But if it reaches example.ch/fr/b2b that the user must be directed to the old site. Here are my rules:

RewriteRule fr/produits-fr/equilibre-et-vitalite-fr/ortie-fr https://exemple.swiss/products/ortie [R=301,L]
RewriteRule fr/produits-fr https://sekoya.swiss/collections/all [R=301,L]
RewriteRule en/ https://exemple.swiss/a/l/en [R=301,L]
RewriteRule de/ https://exemple.swiss/a/l/de [R=301,L]
RewriteRule fr/ https://exemple.swiss/a/l/de [R=301,L]
RewriteCond %{REQUEST_URI} !^fr/b2b
RewriteRule (.*) https://www.exemple.swiss/ [R=301,L]

But currently if I go to ex.com/fr/b2b I come across the new site on the home page. Do you see a problem in my rule or condition?

Tanks a lot




Aucun commentaire:

Enregistrer un commentaire