La création de site web implique de se tenir à jour et au courant des évolutions techniques.
Vous retrouverez ici les pages que nous avons visitées et dont nous avons estimées digne d’intérêt.
Il n’y a d’ailleurs pas que de la technique…
Apache redirect www to non-www and HTTP to HTTPS — Simone Carletti
Mai 2025, Par Veille pyrat.netApache Configuration
To configure the redirects, add the following redirect rule either to the Apache config file if you have access to it, or to the .htaccess in the root of your site :
RewriteEngine On
RewriteCond %HTTPS off [OR]
RewriteCond %HTTP_HOST ^www. [NC]
RewriteCond %HTTP_HOST ^(?:www.) ?(.+)$ [NC]
RewriteRule ^ https://%1%REQUEST_URI [L,NE,R=301]
If instead of example.com you want the default URL to be www.example.com, then simply change the third and the fifth lines :
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]
→ Lire la suite sur le site d’origine…
