User Tag List

Results 1 to 6 of 6
  1. #1

    any .htaccess wizard people on here?

    On the old site
    http://www.ntsc-uk.com/review.php?pl...ilightPrincess

    On the new site
    http://bordersdown.net/content/843-L...tendo-Gamecube

    I want the first to redirect to the second, but it keeps going to 404 not found.

    Here's what the .htaccess looks like at the moment. What did I do wrong? What would fix it?
    (The first section is so that old domains (that I control) do proper 301s)

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(.*)ntsc-uk.com [NC]
    RewriteRule ^(.*)$ http://bordersdown.net/$1 [R=301,L]
    RewriteCond %{HTTP_HOST} ^(.*)www.ntsc-uk.com [NC]
    RewriteRule ^(.*)$ http://bordersdown.net/$1 [R=301,L]
    RewriteCond %{HTTP_HOST} ^(.*)ntsc-uk.co.uk [NC]
    RewriteRule ^(.*)$ http://bordersdown.net/$1 [R=301,L]
    RewriteCond %{HTTP_HOST} ^www\.bordersdown\.net [NC]
    RewriteRule ^(.*)$ http://bordersdown.net/$1 [L,R=301]
    # RewriteCond %{HTTP_HOST} ^bordersdown.net
    # RewriteRule (.*) http://bordersdown.net/$1 [R=301,L]

    Redirect 301 /review.php?platform=ngc&game=LegendOfZeldaTwilight Princess /content/843-Legend-of-Zelda-Twilight-Princess-Review-Nintendo-Gamecube
    Last edited by charlesr; 18-06-2017 at 06:56 PM.

  2. #2
    I don't know .htaccess but I know regex and those Rewrite rules "appear" to be saying (for example):

    Replace THE_STUFF_IN_FRONT_OF_NTSC-UK.COM with http://bordersdown.net/THE_STUFF_IN_...OF_NTSC-UK.COM

    Which I don't think is what you want?

  3. #3
    Like Brad said, it's just pattern matching/replacing.

    The bigger issue is that you have two completely different ways of referring to the articles
    /review.php?platform=ngc&game=LegendOfZeldaTwilight Princess
    versus
    /content/843-Legend-of-Zelda-Twilight-Princess-Review-Nintendo-Gamecube

    Unless you make individual rules for each and every review and article, you're not going to have much luck.

  4. #4
    I'm only going to do it for the top 20 back links, so I won't need rules. Just going to do an exact rule for each one.

    The first section is working correctly. It makes sure that whether people put www.ntsc-uk.com or just ntsc-uk.com or www.bordersdown.net, it always ends up as bordersdown.net

    I just don't understand why my seemingly simple extra rule for the review url doesn't translate properly.

  5. #5
    You have a space in Twilight Princess?

    or maybe you need to escape the period (like we all do AMIRITE):
    /review\.php?platform=ngc&game=LegendOfZeldaTwilight Princess
    Last edited by kryss; 19-06-2017 at 03:37 PM.

  6. #6
    LOL

    And the space is some weird forum glitch. It's literally not there when I paste it in to the forum and magically appears.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •