kalvn's links
Tag cloud
Picture wall
Daily
RSS Feed
  • RSS Feed
  • Daily Feed
  • Weekly Feed
  • Monthly Feed
Filters

Links per page

  • 20 links
  • 50 links
  • 100 links

Filters

Untagged links
regex - Generic htaccess redirect www to non-www - Stack Overflow https://stackoverflow.com/questions/234723/generic-htaccess-redirect-www-to-non-www
28/12/2015 10:04:49

Petite cheat sheet htaccess pour rediriger le trafic du sous-domaine www vers le domaine.
Note : la première ligne est à ignorer si elle est déjà présente dans le fichier htaccess.

RewriteEngine On

RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www.(.)$ [NC]
RewriteRule ^(.
)$ http://%1/$1 [R=301,L]

RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www.(.)$ [NC]
RewriteRule ^(.
)$ https://%1/$1 [R=301,L]

htaccess www web
3843 links, including 129 private
Shaarli - The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community - Theme by kalvn