subdomain messing up .htaccess

Discussion in 'Apache' started by saram, May 9, 2010.

  1. #1
    Hi everyone,

    i used following rules to make subdomain.

    RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
    RewriteCond %{HTTP_HOST} ^([a-z0-9]+)\.domain\.com
    RewriteRule (.*) profile.php?user=%1 [L,QSA]

    it's working perfect but my real 2 subdomains not working any more.

    Please help!

    Advance thanks
     
    saram, May 9, 2010 IP
  2. gopkris2000

    gopkris2000 Peon

    Messages:
    86
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Yes.. Your rewrite code settings will be redirecting all subdomains... Please check this rewrite code

    RewriteCond %{HTTP_HOST} ^([a-z0-9]+)\.domain\.com
     
    gopkris2000, May 9, 2010 IP
  3. saram

    saram Greenhorn

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    Thanks for reply, i got another problem. my index page is not working. When i am opening domain. It's showing me profile.php page.

    Please help!
     
    saram, May 10, 2010 IP