point url to www

Discussion in 'Domain Names' started by Cinta April, Apr 21, 2008.

  1. #1
    hi is there any way i can point my subdomain url to its www equivalent?
     
    Cinta April, Apr 21, 2008 IP
  2. xrvel

    xrvel Notable Member

    Messages:
    918
    Likes Received:
    30
    Best Answers:
    2
    Trophy Points:
    225
    #2
    Did you mean forwading http://example.com to http://www.example.com?

    Create a .htaccess file, and fill it with this content :
    
    <IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteCond %{HTTP_HOST} ^hello\.com$ [NC]
        RewriteRule ^(.*)$ http://www.hello.com/$1 [L,R=301]
    </IfModule>
    
    Code (markup):
     
    xrvel, Apr 21, 2008 IP
    enter.net likes this.
  3. enter.net

    enter.net Banned

    Messages:
    241
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks xrvel. Doesn't he deserves a green :) ?
     
    enter.net, Apr 21, 2008 IP
  4. SZ4h(dot)CoM

    SZ4h(dot)CoM Banned

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    this will work with some servers only which support mod rewrite engine
    so if it doesn't work with you ask your hosting provider to install mod rewrite
     
    SZ4h(dot)CoM, Apr 22, 2008 IP