htaccess pour https

Par LOICK HEROGUER, il y a 3 ans


bonjour, J'utilise ce script et j'aimerai gèrer la redirection en https

Options +FollowSymLinks -Indexes RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L]

Ce que je veux

J'aimerai une redirection du site en https

6 réponses

Arzou, il y a 3 ans

Hello !

RewriteEngine On RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC] RewriteRule ^.*$ https://www.%1%{REQUEST_URI} [L,NE,R=301]
LOICK HEROGUER, il y a 3 ans

Merci de ta reponse mais il faut que ça redirige sur index.php je crois pour fonctionner

Arzou, il y a 3 ans

Pourquoi ? Dans ton url il y a toujours /index.php ?
Tu développes comment ?

LOICK HEROGUER, il y a 3 ans

J'utilise comme base le cursus
Mise en pratique de la POO en PHP

LOICK HEROGUER, il y a 3 ans

Avec un routeur un renderer

Arzou, il y a 3 ans

Tu ne peux pas changer la route ? Parce que garder le index.php dans l'url c'est pas ouf ouf