Hi Andreas,

You can do:

   ListenHTTP
   Address x.x.x.x
   Port 80
   xHTTP 2
   Service
        HeadRequire "Host:\s*www\.domain1\.com.*"
        Redirect "http://www.domain1.com";
   End

   ListenHTTPS
   Address y.y.y.y
   Port 443
   xHTTP 2
   Ciphers "ALL:-ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP"
   Cert "/path/to/cert.pem"
   Service
        HeadRequire "Host:\s*www\.domain1\.com.*"
        Redirect "https://www.domain1.com";
   End

And similar for other redirections.  Enjoy!

Regards,

        
Steve Amerige, Fat Bear Incorporated <http://www.fatbear.com>
Web Engineering | Graphic Design | Creative Marketing
Website, Java, and Source-Code Hosting



On 11/27/2010 7:24 AM, Andreas wrote:
Hello,

our organization has two domains, say domain1.com and domain2.com. We run
a website, and want to have all HTTP traffic to go via
http://domain1.com/. So we need to redirect all incoming requests for any
other domain (for example, www.domain1.com, domain2.com, www.domain2.com,
...) to domain1.com. I tried this using a

    Service
      URL "!^http://domain1.com";
      Redirect 301 "http://domain1.com";
    End

But, apparently, this does not work. Perhaps one of you can help by
pointing me towards my mistake?

Oh, and a second question: We need to do the same for HTTPS, because our
SSL certificate is for the domain1.com domain. So the question is if the
redirect is applied *before* or *after* the traffic is encrypted (or,
rather, if the user going to domain2.com will be given a certificate
warning because the domain does not match, even though he will be
redirected to the correct domain).

Thanks for your insight!

Andreas.


--
To unsubscribe send an email with subject unsubscribe to [email protected].
Please contact [email protected] for questions.





--
To unsubscribe send an email with subject unsubscribe to [email protected].
Please contact [email protected] for questions.

Reply via email to