Redirect URL to another URL

Discussion in 'Apache' started by rvnhanh, Nov 7, 2009.

  1. #1
    Hi when I use redirect in .htaccess like :

    Redirect ^oldpage.html http://www.example.com/newpage.html [R=301,L]

    I got error :

    500 Internal Server Error

    How can I fix it. Thank you
     
    rvnhanh, Nov 7, 2009 IP
  2. bobchrist

    bobchrist Active Member

    Messages:
    4,102
    Likes Received:
    95
    Best Answers:
    0
    Trophy Points:
    88
    #2
    bobchrist, Nov 7, 2009 IP
  3. chadsmith

    chadsmith Peon

    Messages:
    82
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Redirect should be RewriteRule

    RewriteRule ^oldpage.html http://www.example.com/newpage.html [R=301,L]
    Code (markup):
     
    chadsmith, Nov 8, 2009 IP
  4. conceptskateboarding

    conceptskateboarding Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Can you usee cpanel to do this? I think their is a bit in cpanel for redirects.
     
    conceptskateboarding, Nov 8, 2009 IP
  5. lshaw

    lshaw Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    There is a part in cpanel but all it does is add that line to your .htaccess file
     
    lshaw, Nov 8, 2009 IP
  6. rvnhanh

    rvnhanh Guest

    Messages:
    168
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Yah I fixed it. Thank you :)
     
    rvnhanh, Nov 14, 2009 IP