HTTPS on main domain, HTTP on subdomains?
-
Hi! I have a website with an SSL installed. Right now, I have my HTACCESS file forcing HTTPS on all pages and sites. It works fine. I also have the HTTPS plugin.
Instead of buying a WildCard SSL for my subdomains, I decided I don’t need HTTPS for my subdomains. I’d like to do something to my site so it forces HTTP on subdomain sites and HTTPS on my main site. The solution must be to do something in my HTACCESS file, but I’m not sure what. I’ve tried doing some ‘ignore’ commands like I’ve seen on other posts, but it’s not working out for me.
I’d like mysite.org to be HTTPS and subdomains, like ps.mysite.org, to be HTTP.
Here’s a copy of part of my script:
# BEGIN HTTPS Redirection Plugin <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ #RewriteCond %{HTTP_HOST} !^ps\. RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule> # END HTTPS Redirection PluginThe part I #’ed out is not working as it should, but I expected it to ignore the forced HTTPS if I’m on the ‘ps’ subdomain.
Do you have any idea what I can do to make this work? I’d appreciate any advice you can give me!
Thanks,
M
The topic ‘HTTPS on main domain, HTTP on subdomains?’ is closed to new replies.