Problème de FORCE HTTPS
... / Problème de FORCE HTTPS
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

Problème de FORCE HTTPS

by
LouisP7
Created on 2019-11-15 13:15:28 (edited on 2024-09-04 13:39:09) in Erreur connexion SSL

Bonjour je teste mon site avec WHY not PALOCK ?

A chaque fois j'ai ce message " Force HTTPS
Your webserver is not forcing the use of SSL.
You may want to add a redirect to ensure a secure connection is used. More Info "

En cliquant sur More info j'ai :

RewriteEngine On
RewriteCond %{HTTP_HOST} jesurvis\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://jesurvis.com/$1 [R,L]

Je rentre ça sur le .htacces via le ftp de OVH mais rien n'a changé. J'ai quand même le cadenas de sécurité, mais j'ai toujours ce FORCE HTTPS qui me gène et je ne sais pas si c'est réellement nuisible ou non.

Si vous avez des solutions, je suis preneur, je n'y connais pas grand chose. Je ne sais pas même si j'ai correctement écris dans le .htaccess

Merci


1 Reply ( Latest reply on 2019-11-15 13:37:14 by
kyodev
)

```text ```text
curl --head -XGET --user-agent Firefox http://jesurvis.com/
HTTP/1.1 302 Found
Location: https://jesurvis.com/ (charset=iso-8859-1)

curl --head -XGET --user-agent Firefox http://www.jesurvis.com/
HTTP/1.1 302 Found
Location: https://www.jesurvis.com/ (charset=iso-8859-1)

curl --head -XGET --user-agent Firefox https://jesurvis.com/
HTTP/2 200 (charset=UTF-8)

curl --head -XGET --user-agent Firefox https://www.jesurvis.com/
HTTP/2 301
location: https://jesurvis.com/ (charset=UTF-8)

locations utilisées:
https://jesurvis.com/
https://www.jesurvis.com/
```

c'est presque bien

tu peux enlever ce que tu a mis et en tête du .htaccess:
```text
RewriteEngine On

## www -> no-www
RewriteCond %{HTTP_HOST} ^www\.(.+)$
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L,NE,QSA]

## http -> https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE,QSA]
```
tu n'auras qu'un seul saut sans besoin de personnaliser
et change de service pour tester ;)


(tu as activé le *"firewall"* Ovh, qui peut causer des soucis à Wordpress) ```

Replies are currently disabled for this question.