Redirection avec expressions régulières dans le .htaccess
Bonjour,
J'essaye depuis plusieurs semaines de rediriger les URLs (+50 000 URL) suivantes vers le nouveau sous domaine.
La règle de redirection que j'ai créé fonctionne ... avec l'outil REGEX
Code:
.*((FR|GB)?-?)((lieu|actu)_)([a-zA-Z0-9-]+)(_(T011|ACTU):[a-zA-Z0-9]+\.html)$
Exemple d'URL
Code:
1 2 3 4 5 6
| https://www.mondaine.com/lieu_arboretum-robert-ruffier-lanche_T011:Q2859692.html
https://www.mondaine.com/lieu_lille_T011:Q648.html
https://www.mondaine.com/lieu_gard_T011:Q12515.html
https://www.mondaine.com/FR-lieu_bouffemont_T011:Q1166358.html
https://www.mondaine.com/GB-lieu_fouesnant_T011:Q245149.html
https://www.mondaine.com/FR-lieu_oberschaeffolsheim_T011:Q21464.html |
Code:
https://m.mondaine.com/$1$3$5$6
Ex d'URL
Code:
1 2 3 4 5 6
| https://m.mondaine.com/lieu_arboretum-robert-ruffier-lanche_T011:Q2859692.html
https://m.mondaine.com/lieu_lille_T011:Q648.html
https://m.mondaine.com/lieu_gard_T011:Q12515.html
https://m.mondaine.com/FR-lieu_bouffemont_T011:Q1166358.html
https://m.mondaine.com/GB-lieu_fouesnant_T011:Q245149.html
https://m.mondaine.com/FR-lieu_oberschaeffolsheim_T011:Q21464.html |
mais dès que je l'implémente dans le .htaccess, et que j'appelle mon URL https://www.mondaine.com/lieu_arboretum-robert-ruffier-lanche_T011:Q2859692.html... et bien ça ne redirige pas :(
Je suis sous WP et chez OVH Mutualisé...
Le contenu actuel de mon htaccess est le suivant
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| <IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Redirect 301 /recherche.html https://m.mondomaine.com/recherche.html
Redirect 301 /preferences.html https://m.mondomaine.com/preferences.html
Redirect 301 /a-proximite.html https://m.mondomaine.com/a-proximite.html
Redirect 301 /aide-a-la-navigation.html https://m.mondomaine.com/aide-a-la-navigation.html
Redirect 301 /contact.html https://m.mondomaine.com/contact.html
Redirect 301 /a-propos.html https://m.mondomaine.com/a-propos.html
Redirect 301 /mentions-legales.html https://m.mondomaine.com/mentions-legales.html |
Pouvez vous m'aider ? J'oublie quelque chose ?
Merci d'avance !!!