Loading ...
Sorry, an error occurred while loading the content.

Re: [NH] using redirect

Expand Messages
  • Rudolf Horbas
    Mike, ... I d cascade them like that: 1. mod_rewrite fast, transparent, little effort (per-directory rewrites) The 301 header is set, so robots give up on the
    Message 1 of 4 , Apr 21, 2006
    • 0 Attachment
      Mike,

      > Of the methods listed on the page is one preferable over another? Reasons?

      I'd cascade them like that:

      1. mod_rewrite
      fast, transparent, little effort (per-directory rewrites)
      The 301 header is set, so robots give up on the old page

      2. HTTP header by script (php, asp and the like)
      more effort, because you'd have to touch *every* file that must be
      redirected. But the 301 header is set.

      3. JavaScript and meta refresh
      Least efficient, search engines might remember the old url *forever*
      (and they probably don't follow and index the destination url)

      > It seems "mod_rewrite" is preferred, but it is beyond me.

      mod_rewrite is nifty, but a bit tricky. And it would work best if you
      could express your url changes in a Regex pattern. The example you gave
      in the original post is no help here, if you want to redirect more than
      one page:

      > http://www.mbreiding.us/2006/ERT_2006/fl/parks_hikes/oleno/
      >
      > Redirected to:
      > http://epicroadtrips.us/2006/winter/oleno_state_park/

      (You don't want to create an individual rule for every single page!)

      But as you're mostly using directory names instead of filenames, like
      /2006/ERT_2006/fl/parks_hikes/san_fel/
      , you could rename *all* of your index-files to the extension .php (if
      they're different, like *.htm*) and replace their content with

      <?php
      // Permanent redirection
      header("HTTP/1.1 301 Moved Permanently");
      header("Location: http://epicroadtrips.us/path/to/your/file/");
      exit();
      ?>

      (assuming you have php available; it is on the machine though)

      Hope this helps,
      Rudi
    Your message has been successfully submitted and would be delivered to recipients shortly.