1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

What's the line for a redirect?

Discussion in 'Apache' started by fryman, Jun 28, 2005.

  1. #1
    I want to redirect domain.com to www.domain.com, could someone type the line I need to add to my .htacces file? And could you tell me if it needs to go in some specific place? (I mean, at the beginning of the file, or after certain command or line, or at the end, etc)

    Thanks
     
    fryman, Jun 28, 2005 IP
  2. frankm

    frankm Active Member

    Messages:
    915
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    83
    #2
    RewriteEngine On
    RewriteRule (.*) http://www.domain.com$1 [R=301,L]
     
    frankm, Jun 28, 2005 IP
  3. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #3
    hmm... doesn't look quite like what I was expecting... I found this, would it work?

     
    fryman, Jun 28, 2005 IP
  4. mopacfan

    mopacfan Peon

    Messages:
    3,273
    Likes Received:
    164
    Best Answers:
    0
    Trophy Points:
    0
  5. mariancon

    mariancon Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Redirect permanent / http://www.domain.com/
     
    mariancon, Jun 28, 2005 IP