NeoVidaMedia
-
Posts
2 -
Joined
-
Last visited
Posts posted by NeoVidaMedia
-
-
I recently installed a SSL certificate for one of my domains, on a hosting account that includes several other domains. To redirect visitors to the SSL version of the website (because the SSL certificate only works for the www. version of the site) I use the following code in my .htaccess file:
#First rewrite any request to the wrong domain to use the correct one (here www.)RewriteCond %{HTTP_HOST} !^www\.RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]#Now, rewrite to HTTPS:RewriteCond %{HTTPS} offRewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]This works fantastically for the domain in question, but unfortunately it also happens for all other domains, none of which have SSL certificates, giving all visitors an error at the moment.I am not very familiar with .htaccess functions, abilities, and code. I am looking for something like this:if (domain name includes 'domain1.com'){if (domain name also includes '/forums/' or '/blog/'){do nothing}else}
SSL Certificate, Addon Domains, and ModRewrite
in Apache HTTP Server
Posted
I've tried so many things! I am getting a massive headache. Just in case someone tried to help, here is some specific information:
On my hosting account I have the following domains:
realbanknotes.com
mcatzone.com
digitalproteus.com
I also have the following subdomains:
blog.realbanknotes.com
micro.digitalproteus.com
Also, I have the following directory:
realbanknotes.com/forums/
Here is what I have been trying to do: