Re: Passer son site en HTTPS

Hello Julkien

Pour PlanetHoster, c'est un peu plus compliqué.
Il est inutile de commander un certificat car l'hébergeur s'en occupe.
le certificat est produit par let's encrypt. comme pour OVH, il est donc gratuit.
Ci-dessous, le .htaccess à la racine du site (il faut remplacer NDD par le nom de domaine par exemple : kwsphp.org).

Code PHP :
Pour copier le contenu exact du code,
Veuillez citer le message
  1. <?php  
  2. #####!!!#####
  3.  
  4. AddDefaultCharset windows-1252
  5. AddCharset windows-1252 .php
  6.  
  7. php_value default_charset "windows-1252"
  8.  
  9. RewriteEngine on
  10.  
  11. IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
  12.  
  13. <Limit GET POST>
  14. order deny,allow
  15. deny from all
  16. allow from all
  17. </Limit>
  18. <Limit PUT DELETE>
  19. order deny,allow
  20. deny from all
  21. </Limit>
  22. AuthName NDD
  23.  
  24. AddType video/mp4 .mp4 .m4v
  25. AddType video/webm .webm
  26.  
  27. RewriteCond %{SERVER_PORT} ^80$ [OR]
  28. RewriteCond %{HTTPS} =off
  29. RewriteCond %{REQUEST_URI} !^/[0-9]+..+.cpaneldcv$
  30. RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}.txt(?: Comodo DCV)?$
  31. RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/[0-9a-zA-Z_-]+$
  32. RewriteRule ^(.*)$ https://www.NDD/$1 [R=301,L]
  33.  
  34. RewriteCond %{HTTP_HOST} ^NDD$ [NC]
  35. RewriteCond %{REQUEST_URI} !^/[0-9]+..+.cpaneldcv$
  36. RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}.txt(?: Comodo DCV)?$
  37. RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/[0-9a-zA-Z_-]+$
  38. RewriteRule ^(.*)$ https://www.NDD/$1 [R=301,L]
  39.  
  40. #####!!!#####
  41. ?>


Sujet écrit par Fifi69 le jeudi 27 avril 2017 à 09:54

[ Imprimer ] - [ Fermer la fenêtre ]