-
-# BEGIN WordPress
-# Les directives (lignes) entre 'BEGIN WordPress' et 'END WordPress' sont
-# généré dynamiquement, et ne doivent uniquement être modifiées via les filtres WordPress.
-# Toute modification des directives entre ces marqueurs sera outrepassée.
-<IfModule mod_rewrite.c>
-RewriteEngine On
-RewriteBase /
-RewriteRule ^index\.php$ - [L]
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteCond %{REQUEST_FILENAME} !-d
-RewriteRule . /index.php [L]
-</IfModule>
-
-# END WordPress
-
-
# Disable directory index access
Options -Indexes
-
<IfModule mod_rewrite.c>
RewriteEngine On
# Old website URL redirections
+ # NOTE: These redirects need to come before WordPress' default redirect
+ # because the [L] flag will prevent further redirects...
+
+ # staging.ccv-montpellier.fr isn't used currently but it was indexed by Google so we need to redirect all traffic
+ RewriteCond %{HTTP_HOST} ^staging.ccv-montpellier.fr$
+ RewriteRule ^(.*) https://www.ccv-montpellier.fr/$1 [QSA,L,R=301]
+
+ # Original OVH URL that was also indexed by Google
+ RewriteCond %{HTTP_HOST} ^yxnggys.cluster020.hosting.ovh.net$
+ RewriteRule ^(.*) https://www.ccv-montpellier.fr/$1 [QSA,L,R=301]
+
+ # Force HTTPS
+ RewriteCond %{HTTPS} off
+ RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# EN version (temporarily redirecting everything to FR home page since the new EN site isn't ready)
RedirectMatch 302 (?i)^/en/(.*) /
RedirectMatch 301 (?i)^/equipe-medicale-centre-de-chirurgie-vertebrale-montpellier.php /la-clinique/lequipe/
RedirectMatch 301 (?i)^/clinique-du-parc-centre-de-chirugie-vertebrale-montpellier.php /la-clinique/
RedirectMatch 301 (?i)^/anatomie-centre-de-chirurgie-vertebrale-montpellier.php /
- RedirectMatch 301 (?i)^/hernie-discale-centre-de-chirurgie-vertebrale-montpellier /pathologies/hernie-discale-2/
+ RedirectMatch 301 (?i)^/hernie-discale-centre-de-chirurgie-vertebrale-montpellier /pathologies/hernie-discale/
RedirectMatch 301 (?i)^/lombalgie-centre-de-chirurgie-vertebrale-montpellier /pathologies/discopathie-lombaire/
RedirectMatch 301 (?i)^/canal-lombaire-etroit-centre-de-chirurgie-vertebrale-montpellier /pathologies/canal-lombaire-etroit/
RedirectMatch 301 (?i)^/canal-cervical-etroit-centre-de-chirurgie-vertebrale-montpellier /
RedirectMatch 301 (?i)^/formulaire-postop.php /
RedirectMatch 301 (?i)^/actualites.html /actualites/
RedirectMatch 301 (?i)^/contactez-nous.php /contact/
+ RedirectMatch 301 (?i)^/contact-us.php /contact/
</IfModule>
+
+
+
+# BEGIN WordPress
+# Les directives (lignes) entre 'BEGIN WordPress' et 'END WordPress' sont
+# généré dynamiquement, et ne doivent uniquement être modifiées via les filtres WordPress.
+# Toute modification des directives entre ces marqueurs sera outrepassée.
+<IfModule mod_rewrite.c>
+RewriteEngine On
+RewriteBase /
+RewriteRule ^index\.php$ - [L]
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule . /index.php [L]
+</IfModule>
+
+# END WordPress