1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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