logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



Three domains with wildcard ssl - http redirects to one

 
Post new topic   Reply to topic    Apache Forum Index -> Apache



View previous topic :: View next topic  
Author Message
pschmehl



Joined: 13 Oct 2017
Posts: 16
Location: United States, Richardson, TX

PostPosted: Mon 07 Jan '19 23:40    Post subject: Three domains with wildcard ssl - http redirects to one Reply with quote

I have an apache24 server that runs three domains; www, blog, and wiki. All three domains are https, but if you go to any one of them using http instead of https, they all redirect to blog. How do I get each domain to redirect correctly?

I have RedirectPermanent / domain.vvfh.org in the conf files, but it doesn't work. Everything goes to https://blog.vvfh.org/. Obviously, this is undesirable behavior.

What's the correct way to handle this?
Back to top
pschmehl



Joined: 13 Oct 2017
Posts: 16
Location: United States, Richardson, TX

PostPosted: Tue 08 Jan '19 0:30    Post subject: Reply with quote

This seems to have done the trick:

RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

Added to the port 80 section of each vhost. Previously I was using RedirectPermanent / https:/domain.vvfh.org, which was not working.
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache
Page 1 of 1