Web 2.0 Domain Style

Discussion in 'Site & Server Administration' started by Linkbait, Sep 30, 2006.

  1. #1
    I have bought a domain and I want to add that web 2.0 touch by adding the 2 to the front for example say I had the domain 0news.com and wanted it to be 2.0news.com (Note that is not my domain if it is one.) Also, all of the traffic needs to go through the 2.0news.com domain also.

    I am guessing it has somthing to do with .htaccess but I have never done anything like this within an .htaccess so if someone could tell me that would be great.

    Thanks.
     
    Linkbait, Sep 30, 2006 IP
  2. penagate

    penagate Guest

    Messages:
    277
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    That's a horrific effect. Why would you want to do that? It's hard to type, and it looks silly. :)

    But if you insist, you need to add a subdomain "2" and use a rewrite directive in a .htaccess file to redirect all traffic to that subdomain.

    Apache:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www\.){0,1}0news\.com$ [nocase]
    RewriteRule ^(.*)$ http://2.0news.com/$1 [redirect=301,last]
    
    Code (markup):
    Note that mod_rewrite needs to be enabled.

    Regards
    - P
     
    penagate, Sep 30, 2006 IP
  3. Linkbait

    Linkbait Peon

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I just didnt know what to use for the .htaccess.


    Once you see the domain I am acually using you will understand why.
     
    Linkbait, Sep 30, 2006 IP
  4. penagate

    penagate Guest

    Messages:
    277
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Haha - doubtless. :)

    Let me know if that doesn't work.
     
    penagate, Sep 30, 2006 IP