Embed www into web address when typed

Discussion in 'Site & Server Administration' started by operationnos, Jul 28, 2009.

  1. #1
    A client is asking if I can force www to embed in their company web address if somebody types http://thecompany.com. So, if someone enters that, she wants it to default to http://www.thecompany.com . Any suggestions on the server/hosting side?
     
    operationnos, Jul 28, 2009 IP
  2. SecureCP

    SecureCP Guest

    Messages:
    226
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    .htaccess

    
    RewriteEngine on
    Options +FollowSymlinks
    Rewritecond %{http_host} ^yourdomain.com
    Rewriterule ^(.*)$ http://www.yourdomain.com/$1 [r=301,nc]
    
    Code (markup):
    hope this helps!
     
    SecureCP, Jul 28, 2009 IP
  3. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #3
    theapparatus, Jul 28, 2009 IP
  4. operationnos

    operationnos Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Sorry about not giving the details on this situation. They are using an IIS, not Apache so I don't believe the htaccess will help me here. Can anybody help me out with the process in IIS to get this done?
     
    operationnos, Jul 29, 2009 IP
  5. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #5
    theapparatus, Jul 29, 2009 IP