Announcement

Collapse
No announcement yet.

301 redirects with parameters

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    301 redirects with parameters

    The website used to generate pages like: https://ntsc-uk.com/review.php?platf...&game=InitialD

    How do I make a 301 for .htaccess so it ends up at https://bordersdown.net/content/725-...eview-Sony-PS2 ??

    Code:
    Redirect 301 /review.php?platform=ps2&game=InitialD https://bordersdown.net/content/725-Initial-D-Special-Stage-Review-Sony-PS2
    I thought that would do it, but perhaps the server redirect from ntsc-uk to bd.net is happening first and sending everything to the homepage?

    #2
    Use

    Code:
    RedirectMatch 301 /oldpage/ /newpage/

    Comment


      #3
      That's not working either, but if I've noticed that if I try to navigate to
      Code:
      bordersdown.net/review.php?platform=ps2&game=InitialD
      (instead of ntsc-uk.com at the start), it ends up at the page not found page, but if I try anything with ntsc-uk.com at the start, it goes straight to the homepage, so probably multiple issues need solving.

      Comment


        #4
        It's probably down to the parameters, take a look at the format of RewriteRule, you can substitute params via that.

        Actually, as you're not using params in the destination, you're going to have to get a bit more sophisticated I think and do some regex matching.

        Comment


          #5
          Originally posted by MartyG View Post
          It's probably down to the parameters, take a look at the format of RewriteRule, you can substitute params via that.

          Actually, as you're not using params in the destination, you're going to have to get a bit more sophisticated I think and do some regex matching.
          That's what I feared I'm not clever enough to do regex in normal timeframes (I get there in the end....)

          Comment

          Working...
          X