Mod ReWrite without www to www.

Discussion in 'Apache' started by dct, Jun 1, 2005.

  1. #1
    I nearly got there over in http://forums.digitalpoint.com/showthread.php?t=17514 but found the example given also redirected subdomains. I need a redirect that will do
    domain.com -> www .domain.com (and all files and directories under domain.com) but it must not change subdomain.domain.com
     
    dct, Jun 1, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    Is this what you are looking for?
     
    digitalpoint, Jun 1, 2005 IP
  3. dct

    dct Finder of cool gadgets

    Messages:
    3,132
    Likes Received:
    328
    Best Answers:
    0
    Trophy Points:
    230
    #3
    I'm after an all in .htaccess solution (I don't have access to the conf file). I'm sure I've seen one before, cannot find it now. I've Googled all over the place and I really don't have the time to learn the ins and outs or RewriteCond.
    Any help is appreciated, thanks for the other thread pointer it's just not quite what I need.
     
    dct, Jun 1, 2005 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    Check the rest of the thread, I believe someone posted a solution to do it with .htaccess.
     
    digitalpoint, Jun 1, 2005 IP
  5. dct

    dct Finder of cool gadgets

    Messages:
    3,132
    Likes Received:
    328
    Best Answers:
    0
    Trophy Points:
    230
    #5
    It looks like they are the opposite to what I need, they show how to redirect www .domain.com to domain.com whilst I need to redirect domain.com to www .domain.com, but not on any subdomains. I tried swapping the lines around a bit (by logical guess work) but only managed to achieve a server error. This is driving me nuts.
     
    dct, Jun 1, 2005 IP