Need help for creating virtual subdomains on godaddy hosting

Discussion in 'Site & Server Administration' started by qasimbilal, Sep 30, 2010.

  1. #1
    Hi

    I am using .htaccess to create virtual subdomains. I added *.domainname.com in my hosting account. I am using following code.

    #RewriteCond %{HTTP_HOST} .
    #RewriteCond %{HTTP_HOST} !^www\. [NC]
    #RewriteCond %{HTTP_HOST}<>%domainname.com ^domainname.com/home.php?user=$1 [NC]
    #RewriteCond %1<>%3 !^(.*)<>\1$ [NC]
    #RewriteCond %{HTTP_HOST} ^(.+)$
    #RewriteCond %{HTTP_HOST} ^domainname.com$ [NC]
    #RewriteRule ^(.*)$ http://domainname.com/$1 [R=301,L]

    Please guide

    thanks
     
    qasimbilal, Sep 30, 2010 IP
  2. LyNHS

    LyNHS Peon

    Messages:
    57
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Why do you want to create virtual subdomains? I'm pretty sure your hosting package comes with loads, if not unlimited subdomains ....

    From the look of your code above, are you trying to achieve:

    subdomain.domain.com redirect to domain.com/subdomain?

    All the best,
    Lynn.
     
    LyNHS, Oct 1, 2010 IP