Noms de domaine-old - Bug redirection www vers non www
... / Bug redirection www vers ...
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Frage

Bug redirection www vers non www

Von
GillesG36
Erstellungsdatum 2024-10-01 14:43:34 (edited on 2024-11-18 11:12:32) in Noms de domaine-old


Bonjour ,

Mes noms de domaines sont institutlamalgue.fr et parapharmacie-lamalgue.com

Et j'utilise public cloud d'OVH

Je rencontre la problématique suivante
Problème de redirection www dans le fichier .htaccess et configuration DNS

J'ai un domaine principal parapharmacie-lamalgue.com, qui fonctionne correctement et redirige vers institutlamalgue.fr.
J'essaye de configurer la redirection pour https://www.parapharmacie-lamalgue.com afin qu'il redirige également vers https://institutlamalgue.fr.

Fichier .htaccess actuel :
Voici le contenu actuel de mon fichier .htaccess :

bash
Copier le code
RewriteEngine On

# Forcer HTTPS pour toutes les requêtes
RewriteCond %{ENV:HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Redirection de www.parapharmacie-lamalgue.com vers institutlamalgue.fr
RewriteCond %{HTTP_HOST} ^www\.parapharmacie-lamalgue\.com$ [NC]
RewriteRule ^(.*)$ https://institutlamalgue.fr/$1 [L,R=301]

Avez-vous une idée du problème pour que je trouve le prestataire adequat pour y remédier ?
Je vous remercie par avance !


3 Antworten ( Latest reply on 2024-11-18 11:12:41 Von
GillesG36
)


Redirection de www.parapharmacie-lamalgue.com vers institutlamalgue.fr

RewriteCond %{HTTP_HOST} ^www.parapharmacie-lamalgue.com$ [NC]
RewriteRule ^(.*)$ https://institutlamalgue.fr/$1 [L,R=301]


Bonjour,

Je viens de tester votre redirection avec et sans www, et elle fonctionne (mais pas en https)
parce que vous utilisez les redirections OVH et non celles de votre hébergement sur cluster029.
Dans votre zone DNS, remplacez tous les 213.186.33.5 par 51.91.236.255


L'autre site institutlamalgue.fr n'est pas hébergé chez OVH mais chez Wordpress.com.

Merci beaucoup pour votre réponse, je corrige ça !

Tout fonctionne très bien, toute l'équipe vous remercie,
Bonne journée !