From 4f66c3599b67364a5293660cf9ad95e2a6452c54 Mon Sep 17 00:00:00 2001 From: zPlus <-> Date: Sat, 1 Apr 2017 21:37:30 +0200 Subject: [PATCH] .htaccess.prod: Fix rule to remove www. --- .htaccess.prod | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.htaccess.prod b/.htaccess.prod index 595678b2..bda2d8e0 100755 --- a/.htaccess.prod +++ b/.htaccess.prod @@ -9,8 +9,11 @@ RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Remove www - RewriteCond %{HTTP_HOST} ^www\.freepo\.st$ [NC] - RewriteRule ^(.*)$ https://freepo.st/$1 [R=301] + RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] + RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,QSA,NC,L] + + # RewriteCond %{HTTP_HOST} ^www\.freepo\.st$ [NC] + # RewriteRule ^(.*)$ https://freepo.st/$1 [R=301] # Remove trailing slashes # RewriteRule (.*)/+$ https://freepo.st/$1 [NC,L,R=301,QSA]