Okay, so I tried your suggestion. The redirect itself works fine. However,
Now I have an interesting problem. Whenever I try to access
https://mydomain.org/cgi-bin/myscript.pl, I get redirected to
http://mydomain.org/cgi-bin/myscript.pl ? I would expect to get forwarded
to backend 10.0.10.11:80 instead ...

Here's my config:

ListenHTTP
  RewriteDestination 0
  RewriteLocation    0
  Address            10.0.10.109
  Port               80
  xHTTP              2
  Service
    HeadDeny         "Host:\smydomain.org.*"
    Redirect         301 "http://mydomain.org";
  End
  Service
    Session
      Type           IP
      TTL            300
    End
    BackEnd
      Address        10.0.10.110
      Port           80
    End
  End
End

ListenHTTPS
  RewriteDestination 0
  RewriteLocation    0
  Address            10.0.10.109
  Port               443
  xHTTP              2
  Cert               "/etc/pound/mydomain.de.pem"
  Ciphers            "HIGH:!SSLv2"
  Service
    HeadDeny         "Host:\smydomain.org.*"
    Redirect         301 "https://mydomain.org";
  End
  Service
    Session
      Type           IP
      TTL            300
    End
    URL              "^/cgi-bin"
    BackEnd
      Address        10.0.10.11
      Port           80
    End
  End
  Service
    Session
      Type           IP
      TTL            300
    End
    BackEnd
      Address        10.0.10.110
      Port           80
    End
  End
End

Thanks for your insight :)

Andreas.

> 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.
>



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

Reply via email to