This is one of those entries I make after finally learning how to do something I've wanted to know how to do for awhile. I make these entries for two reasons: 1) it's theoretically possible I might forget what I learned, and 2) someone else might have been wondering the exact same thing, and if I had difficulty finding a place where the information was spelled out (no matter how available and easy to find the information might actually be), I think it's possible someone else might have had the same difficulty.
If you go to http://en.wikipedia.org/ (for example), you'll be redirected to http://en.wikipedia.org/wiki/Main_Page. I know how to use HTML to make one page redirect to another, but it's flaky and seems to require a time-delay. (Changing the time-delay to 0 seems to work with some browsers and give seizures to others. Probably something I'm doing wrong.) And if you dig into the internals of an HTTP session with port 80 on en.wikipedia.org, you'll see that what it's doing isn't anything like sending an HTML document with redirect information.
So here's how to do exactly what Wikipedia (and probably trillions of other sites) does: create (if it doesn't exist) the
If you leave out the 301, the browser will be told the page has moved temporarily. If you include the 301, the browser will be told the page has moved permanently.