How do I do a 301 re-direct

Discussion in 'Apache' started by Hawaii, Nov 25, 2008.

  1. #1
    I am trying to do a 301 but it does not work with these pages.
    file name:
    index.html?pg=0&mid=173

    want to re-direct this to a normal html page.

    anyone know how to do this.
     
    Hawaii, Nov 25, 2008 IP
  2. Bagi Zoltán

    Bagi Zoltán Well-Known Member

    Messages:
    364
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #2
    I have some idea how did you manage to create parametric URI with a html file, though this is very strange. Anyway, I think you should use this rewrite code

    RewriteCond %{query_string} ^pg=0&mid=173 $ 
    RewriteRule ^(.*)$ http://www.yoursite.com/normal.html$1 [L,R=301]
    Code (markup):
     
    Bagi Zoltán, Nov 28, 2008 IP
  3. Hawaii

    Hawaii Active Member

    Messages:
    368
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Thanks Zoltan but it did not work, got a error
     
    Hawaii, Nov 28, 2008 IP
  4. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #4
    What error did you get ?
     
    Bohra, Nov 28, 2008 IP