Stop WWW for sub-domain with htaccess – Apache
my subdomain.example.com redirecting to www.subdomain.example.com. Htaccess code : # ensure www. RewriteCond %{HTTP_HOST} !^www. [NC] RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # ensure https RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] ### END WWW & HTTPS I am looking…