Classic mismatch

So I’m poking around in the 2003 archives for something or other, and I discover to my horror that the link under the logo goes 404.

Which, of course, is easily explained: said link went to thisheredomain/index.html, but nowadays the front page is at thisheredomain/index.php.

I saw three ways to approach this issue:

  1. Install a redirect in .htaccess (this place runs on Apache) to intercept calls to that nonexistent page and route them to the new location.
  2. Fake up an index.html page with its own redirect.
  3. Go back and edit twelve thousand or so files.

If you’ve been here a while, you already know which option I took.

Share

7 comments

  1. McGehee »

    28 September 2008 · 11:23 am

    That’s why I try to avoid using page identifiers anymore when pointing to the default file in a directory. Even in relational links on static pages, I use a slashdot link (<a href=”/.”>) rather than naming “index.html” or whatever variant may be in place.

    It works fine on the web, though navigating among local copies in my browser I get a folder list instead of the desired document. I live with it.

  2. McGehee »

    28 September 2008 · 11:25 am

    Gaahhhh! Not slashdot — dotslash!

    <a href=”./”>

    I shoulda checked my code before I posted.

  3. robohara »

    28 September 2008 · 1:43 pm

    Actually, editing 12,000 isn’t that bad these days. I use a command line utility called GSAR (Global Search and Replace) for such projects. I think it was adapted from a *nix command, but I use it in Windows/DOS. Of course the files have to be stored locally, which would mean transferring 12,000 down, editing them, and transferring them back. That’s one of the advantages of running your own webserver locally. (Not trying to sound elitist; believe me, there are plenty of disadvantages as well.)

  4. CGHill »

    28 September 2008 · 2:19 pm

    I don’t run my own server, but I do have backup copies of all the static pages, just in case.

    Funduc’s Search and Replace did the dirty editing work for me: 11,560 files processed in about two minutes. Unfortunately, FTP was a two-hour chore, mostly because I had to send 100-200 at a time to avoid messing with the Web server’s little brain.

  5. McGehee »

    28 September 2008 · 5:20 pm

    I don’t run my own server, but I do have backup copies of all the static pages, just in case.

    Ditto here. I wonder if there’s a correlation between how long someone’s been managing their own website, and their tendency to keep editable copies of static pages on their own machine?

  6. Old Grouch »

    28 September 2008 · 11:06 pm

    If you’ve been here a while, you already know which option I took.

    (d) None of the above?

  7. CGHill »

    29 September 2008 · 7:15 am

    That was my first choice, but eventually I opted for #3, otherwise known as C.

RSS feed for comments on this post