Quotidien Shaarli

Tous les liens d'un jour sur une page.

May 14, 2025

Apache redirect www to non-www and HTTP to HTTPS — Simone Carletti

Apache 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]

La gravité est-elle la preuve de l’existence d’un univers computationnel ? | Avancées de l’AIP | Édition AIP

Un article sur la gravité vue comme la résultante d'une optimisation d'un stockage d'informations