I have a folder in my document root which is set up as a subdomain. Now, I'd like to force people to use the subdomain rather than using "domain.tld/sub". I also want to require them to use SSL as well. So I came up with the following .htaccess:
RewriteEngine On
# If they're not using SSL, force them to use it.
RewriteCond %{HTTPS} !=on
RewriteRule .* https://manager.pattersonws.com [R,L]
# If they're reaching the page via: pattersonws.com/manager,
# make them use manager.pattersonws.com
RewriteCond %{HTTP_HOST} !^manager\.pattersonws\.com$ [NC]
RewriteRule ^.* https://manager.pattersonws.com [R,L]
Now, when using this, it hits an infinite loop... not sure why... can anyone see what I'm doing wrong?