Https en http problème redirection toutes pages

Fermé
Carococo - 22 oct. 2017 à 13:34
claudsaille Messages postés 3 Date d'inscription lundi 25 décembre 2017 Statut Membre Dernière intervention 8 janvier 2024 - 25 déc. 2017 à 15:39
Bonjour,

Je fais appelle à votre aide pour un problème de redirection 301.

Je viens de passer un site de http à https.

Le site est sous wordpress j'ai bien fait les réglages dans wordpress.

J'ai modifié le fichier .htaccess avec le code rajouté à la fin (ci-dessous) et pourtant seule la page d'accueil est bien redirigée systématiquement vers https. Si je choisis une autre page et que je tape l'adresse sans le https je ne suis pas redirigée. Je ne comprends pas du tout d'où provient ce problème, sur un autre site j'ai fait le même process et je n'ai eu aucun problème.

Merci d'avance de votre aide !

application/javascript A2419200
ExpiresByType text/javascript A2419200
ExpiresByType text/x-js A2419200
ExpiresByType text/html A3600
ExpiresByType text/richtext A3600
ExpiresByType image/svg+xml A3600
ExpiresByType text/plain A3600
ExpiresByType text/xsd A3600
ExpiresByType text/xsl A3600
ExpiresByType text/xml A3600
ExpiresByType video/asf A2419200
ExpiresByType video/avi A2419200
ExpiresByType image/bmp A2419200
ExpiresByType application/java A2419200
ExpiresByType video/divx A2419200
ExpiresByType application/msword A2419200
ExpiresByType application/vnd.ms-fontobject A2419200
ExpiresByType application/x-msdownload A2419200
ExpiresByType image/gif A2419200
ExpiresByType application/x-gzip A2419200
ExpiresByType image/x-icon A2419200
ExpiresByType image/jpeg A2419200
ExpiresByType application/json A2419200
ExpiresByType application/vnd.ms-access A2419200
ExpiresByType audio/midi A2419200
ExpiresByType video/quicktime A2419200
ExpiresByType audio/mpeg A2419200
ExpiresByType video/mp4 A2419200
ExpiresByType video/mpeg A2419200
ExpiresByType application/vnd.ms-project A2419200
ExpiresByType application/x-font-otf A2419200
ExpiresByType application/vnd.ms-opentype A2419200
ExpiresByType application/vnd.oasis.opendocument.database A2419200
ExpiresByType application/vnd.oasis.opendocument.chart A2419200
ExpiresByType application/vnd.oasis.opendocument.formula A2419200
ExpiresByType application/vnd.oasis.opendocument.graphics A2419200
ExpiresByType application/vnd.oasis.opendocument.presentation A2419200
ExpiresByType application/vnd.oasis.opendocument.spreadsheet A2419200
ExpiresByType application/vnd.oasis.opendocument.text A2419200
ExpiresByType audio/ogg A2419200
ExpiresByType application/pdf A2419200
ExpiresByType image/png A2419200
ExpiresByType application/vnd.ms-powerpoint A2419200
ExpiresByType audio/x-realaudio A2419200
ExpiresByType image/svg+xml A2419200
ExpiresByType application/x-shockwave-flash A2419200
ExpiresByType application/x-tar A2419200
ExpiresByType image/tiff A2419200
ExpiresByType application/x-font-ttf A2419200
ExpiresByType application/vnd.ms-opentype A2419200
ExpiresByType audio/wav A2419200
ExpiresByType audio/wma A2419200
ExpiresByType application/vnd.ms-write A2419200
ExpiresByType application/font-woff A2419200
ExpiresByType application/vnd.ms-excel A2419200
ExpiresByType application/zip A2419200
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

AddHandler x-mapp-php5.5 .php

# BEGIN WordPress
<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

# Redirection vers HTTPS
RewriteCond %{SERVER_PORT} ^80$ [OR]
RewriteCond %{HTTPS} =off
RewriteRule ^(.*)$ https://vmcom.fr/$1 [R=301,L]




1 réponse

Dinath Messages postés 1602 Date d'inscription vendredi 12 avril 2013 Statut Contributeur sécurité Dernière intervention 6 novembre 2021 218
22 oct. 2017 à 14:27
Salut,

J'ai fait un article dessus y'a pas longtemps, commente ton code et met celui-ci:

https://agence-web.cubis-helios.com/forcer-site-https-redirection-301/
0
claudsaille Messages postés 3 Date d'inscription lundi 25 décembre 2017 Statut Membre Dernière intervention 8 janvier 2024
25 déc. 2017 à 15:39
ajouter les redirection dans le fichier .htaccess de cette façon

redirect 301 /vieille-page.htm http://www.domaine.com/nouvelle-page.htm
0