I am trying to enforce https://www.
on all of my pages except hotels.php
.
My current code below is adding www.
twice, i.e. https://www.www.example.com
.htaccess
RewriteEngine On
RewriteCond %{HTTPS} =off
RewriteCond %{REQUEST_URI} !^\/hotels.php\/
RewriteRule (.*) https://www.%{HTTP_HOST}/$1 [L,R=301]
RewriteCond %{HTTPS} =on
RewriteCond %{REQUEST_URI} \/hotels.php\/
RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [L,R=301]
Let me know what I am missing here which causing issue. Thanks