Comment faire une redirection d'un domaine HTTPS vers un nouveau domaine ?
... / Comment faire une redirec...
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.
Question

Comment faire une redirection d'un domaine HTTPS vers un nouveau domaine ?

by
MD

Bonjour,


Je viens de migrer mon site sur son nouveau domaine et je ne parviens pas à faire une redirection 301 de mon ancien domaine en https vers le nouveau.

 

Au niveau de ma configuration, voici ce que j'ai :

- Hébergement + ancien domaine chez OVH ; ancien domaine = dahercreations.com

- Nouveau domaine chez un registrar externe qui pointe vers mon hébergement OVH ; nouveau domaine = epopia.design

 

Sur le dashboard OVH, j'ai bien fais les redirections 301 nécessaires. J'ai donc bien http://dahercreations.com qui redirige vers https://epopia.design

En revanche, la redirections de https://dahercreations.com ne fonctionne pas.

J'ai également essayé de faire cela avec le fichier .htaccess, voici ce que j'ai mis en première ligne du fichier : 

# Début redirection 301
RewriteEngine On
RewriteCond %{HTTP_HOST} ^dahercreations\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.dahercreations\.com$ [NC]
RewriteRule ^(.*)$ https://epopia.design/$1 [R=301,L,NC]
# Fin redirection 301

 

Comment faire pour que le domaine sécurisé https soit bien redirigé vers le nouveau ?


1 Reply ( Latest reply on 2025-02-19 11:13:33 by
fritz2cat 🇧🇪 🇪🇺
)

Bonjour,

Votre redirection fonctionne parfaitement.

De plus comme les deux URL pointent vers le même hébergement OVH , Wordpress fait très bien la redirection lorsque vos deux sites utilisent le même "dossier racine".