Christmas and TheParty is approaching
Christmas Eve is coming quick now — just one day to
go! I’ve made a lot of wishes this year, including ”The C++ Programming
Langauge” by Bjarne Stroustrup; ISBN:0201700735, so that I can learn
some C++. I’ve played with C++ before, see my entry for [/2001/10/29/], but
it’s never been much. With this book, then there’s no excuse for me not to
learn and use the language. And now that the The Party. I’ve
been in Aalborg the last two days, but today I went back with my
father to [Skejbygård][] in Århus to pick up my computer and
Grandma. Everything should be ready for The Party — I have the
ticket, my computer, an inflatable madras, and ear-plugs. Now I just need
some CocaCola :-) I read on http://www.theparty.dk/ that the visitors
consumed over 27.000 litres of Cola last year, and I’m sure that number
will increase again this year… -Martin Geisler
!!!Adding redirects
Now that I’ve moved the WikiWikiWeb to a PhpWiki:PrettyWiki (see also [/2002/12/06/]) there was just one small glitch left: the first link on [Google:Martin Geisler] still points to =/phpwiki/index.php/~Martin Geisler=… The problem is, that this URI still works, and so Google wont remove the page from it’s database.
I’ve now made PhpWiki send out a =HTTP/1.1 301 Moved Permanently= header whenever someone tries to access the WikiWeb using the old URL. I’ve simply added these eight lines to the top of =/phpwiki/index.php=:
if (substr($_SERVER['REQUEST_URI'], 0, 8) == ‘/phpwiki’) {
/* This skips past ‘/phpwiki’ and possibly also over
* ‘/index.php’ if it is present: */
$url = substr($_SERVER['REQUEST_URI'], 19);
header(’HTTP/1.1 301 Moved Permanently’);
header(’Location: http://’ . $_SERVER['HTTP_HOST'] . ‘/wiki/’ . $url);
exit;
}
You can read about the HTTP/1.1 standard in RFC:2616. This should ensure that Google updates it’s links the next time it traverses GimpsterDotCom.
Leave a comment