301 Permanent Redirect, not redirecting to expected url

Discussion in 'Site & Server Administration' started by Percept, Jan 4, 2006.

  1. #1
    Hi,

    I ghot a website whichis build with php pages which have been mod-rewrited so they appear as normal .html pages.

    The site has been redesigned so a few pages need to be redirected to their new equivalent.

    redirect 301 /cursussen.html http://www.domain.be/dansschool/overzicht.html
    redirect 301 /danslessen.html http://www.domain.be/dansschool/overzicht.html
    redirect 301 /kledingzaak.html http://www.domain.be/kledingzaak/overzicht.html
    redirect 301 /boekingskantoor.html http://www.domain.be/boekingskantoor/overzicht.html
    Code (markup):
    The first 2 rules work as expected but the 3de en 4th don't.
    instead of redirecting
    http://www.domain.be/boekingskantoor.html
    Code (markup):
    to
    http://www.domain.be/boekingskantoor/overzicht.html
    Code (markup):
    , it redirects to ->
    http://www.domain.be/boekingskantoor/overzicht.html?page=boekingskantoor&subpage=overzichtboekingskantoor
    Code (markup):
    For some strange reason theere are extra parameters in the URL while these are not in the htaccess redirect. I works for the first 2 but not 3 & 4 ... I have no idea why it's doing this.

    Anyone an idea of why it's doing this and how to fix this ?
    Thanks in advance.
    Bart N.
     
    Percept, Jan 4, 2006 IP
  2. rederick

    rederick Peon

    Messages:
    128
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Do you have other rewrite's above these lines?
    I do my 301's like

    RewriteRule ^oldpage\.php$ /newpage/newfile\.php [R=301,L]

    Not sure which way is better?


    Red.
     
    rederick, Jan 5, 2006 IP