Public Cloud OVHcloud - Erreur 500 lors de la redirection 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.
Frage

Erreur 500 lors de la redirection https

Von
OussamaH
Erstellungsdatum 2018-03-13 18:07:13 (edited on 2024-09-04 13:21:29) in Public Cloud OVHcloud

salut tous le monde,
bah voila mon problème : quand j'essai de créer un fichier htaccess sur le serveur pour forcer le https j'ai une erreur 500, j'ai tous bien suivi tous genre de tuto mais rien n'y fait.
je n'arrive pas a comprendre l'erreur d'autant plus que quand j'écrit moi mm l'url "https://..." ca marche trs bien, alors pourquoi avec le fichier htaccess ca ne marche pas ?
merci a vous :)
ps : j'ai une offre perso chez ovh et je sais pas comment voir les log ! ai-je l'option au moins ?


3 Antworten ( Latest reply on 2018-03-14 15:55:37 Von
OussamaH
)

Pour éviter le DUPLICATE CONTENT :

Extrait de [URL="https://forum.ovh.com/showthread.php/110488-Https?p=674346#post674346"]Https[/URL] - #6


[I]A insérer au début du fichier [B]/www/.htaccess[/B].[/I]
[QUOTE]
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
[/QUOTE]


Extrait de [URL="https://forum.ovh.com/showthread.php/111124-Rediriger-http-vers-https-2-codes?p=678503#post678503"]Rediriger http vers https : 2 codes [/URL] - # 3

[I]A insérer au début du fichier [B]/www/.htaccess[/B].[/I]
Force la redirection en HTTPS

[QUOTE]
RewriteEngine on
RewriteCond %{SERVER_PORT} 80 [OR]
RewriteCond %{HTTP_HOST} ^monsite\.com$ [NC]
RewriteRule ^(.*) https://www.monsite.com/$1 [QSA,L,R=301]
[/QUOTE]

Permet aux navigateurs de se souvenir qu'il doit passer en https pour votre site (HSTS)
[QUOTE]
Header set Strict-Transport-Security "max-age=15811200" env=HTTPS
[/QUOTE]

Extrait de : http://wallu.1orange.fr/pag-ports.htmorange.fr/pag-ports.htm
HTTP : port **_80_**
HTTPS : port **_443_**

Dsl, mais j'ai déjà essayer ça et normalement j'ai pas d'erreur de mixed content
Vous ne savez pas d'où peut venir l'erreur ?

L'erreur 500 peut provenir d'un .htaccess mal codé.


bah voila mon problème : quand j'essai de créer un fichier htaccess sur le serveur pour forcer le https j'ai une erreur 500, j'ai tous bien suivi tous genre de tuto mais rien n'y fait

Tester le script bonjour.php --> **1https://wordetweb.com/word-et-web/OVH-Erreur-500-sur-site-internet-mutualise-htaccess-FR.htmhttps://wordetweb.com/word-et-web/OVH-Erreur-500-sur-site-internet-mutualise-htaccess-FR.htm OVH - Erreur 500 sur votre site Internet _**

non je ne pense pas j'ai vraiment bien vérifié

oui j'ai essayé de faire un teste comme ça c le mm problème (erreur 500)