Internal Server Error with 301 Redirect

Discussion in 'Apache' started by maxxuk, Jul 29, 2006.

  1. #1
    Guys,

    I'm having trouble with a redirect rule in my .htaccess file. Rule is :

    redirect 301 "/somepage.php?page=MP3 Players" /new_page

    ( Note the space in the first path, and the lack of extention in the second. )

    I have a mod-rewrite rule that deals with the second bit :

    RewriteRule ^new_page$ somepage.php?page=MP3\ Players and this works fine.

    What am I doing wrong in the 301 redirect ???

    Cheers,
    Mark.
     
    maxxuk, Jul 29, 2006 IP
  2. Cryogenius

    Cryogenius Peon

    Messages:
    1,280
    Likes Received:
    118
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Have you tried using %20 instead of a space? Should work much better. You can also use a + symbol, but %20 is favoured these days.

    Cryo.
     
    Cryogenius, Jul 30, 2006 IP