How can you ignore subdomains with mod_rewrite?

Discussion in 'Apache' started by nicknick, Oct 26, 2005.

  1. #1
    I have mod_rewrite set to change mydomain.com or anything missing information to http://www.mydomain.com/

    I now need to ignore http://ssl.mydomain.com/ for an e-store. Is there any way to have mod_rewrite do the redirect for the domain name but ignore the rule when it has the ssl. in front of the domain?

    Thank you. :confused:
     
    nicknick, Oct 26, 2005 IP
  2. johnt

    johnt Peon

    Messages:
    178
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Before your RewriteRule doing the redirect, add
    RewriteCond %{HTTP_HOST} !^ssl.mydomain.com$
    Code (markup):
     
    johnt, Oct 27, 2005 IP
    nicknick likes this.
  3. nicknick

    nicknick Peon

    Messages:
    429
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi johnt.

    Thank you! That worked perfectly. I've been trying to figure that out for a whole day. :)
     
    nicknick, Oct 27, 2005 IP