From owner-freebsd-doc Mon Apr 9 21:45:55 2001 Delivered-To: freebsd-doc@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id 5AB1F37B43C; Mon, 9 Apr 2001 21:45:46 -0700 (PDT) (envelope-from dima@unixfreak.org) Received: from spike.unixfreak.org (spike [63.198.170.139]) by bazooka.unixfreak.org (Postfix) with ESMTP id 1E6C63E09; Mon, 9 Apr 2001 21:45:46 -0700 (PDT) To: Nik Clayton Cc: Rasmus Kaj , doc@FreeBSD.ORG, www@freebsd.org Subject: Re: http://www.freebsd.org/docs/, /FAQ/, /handbook/, and others In-Reply-To: <20010409152011.B13162@canyon.nothing-going-on.org>; from nik@freebsd.org on "Mon, 9 Apr 2001 15:20:11 +0100" Date: Mon, 09 Apr 2001 21:45:46 -0700 From: Dima Dorfman Message-Id: <20010410044546.1E6C63E09@bazooka.unixfreak.org> Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Nik Clayton writes: > > b) This shouldn't be a problem eihter. I propose a text file in the > > repository containg the redirects in server-independet format, and > > some simple scripts to turn it into config for any web server. > > Send code. More than likely most people who mirror the FreeBSD web site use Apache. Therefore, why can't we do the redirects via .htaccess files? This is Apache-specific, but the format is simple enough that someone who knows some basic shell scripting could turn it into a format understood by other web servers. Here's an example file to redirect /FAQ/ to /docs/en/books/FAQ/: Redirect permanent /FAQ/ /docs/en/books/FAQ/ It probably wouldn't be necessary to actually put these files in the repository. More likely, a better alternative would be to put something like this in www/en/Makefile WWWREDIR= /FAQ/ /docs/en/books/FAQ/ and add the necessary magic to the build system to generate and install the .htaccess file in the right place (I can probably do this). If someone uses something other than Apache, all they have to do is change a couple lines in one of the Makefiles to generate files of a different format (this shouldn't be terribly difficult). The only catch is that the first URL in the redirect line ("/FAQ/" in the first example above) *must* be an absolue path. Some (most?) of the mirrors don't mirror the site on '/', but rather '/FreeBSD/' or some such. This would be a problem if we have to put the files in the repository, but not if they're generated on the fly; in that case, all someone would have to do is, e.g., `make BASE=/FreeBSD/` instead of plain `make`. Also note that whether redirects are allowed in .htaccess files is up to the administrator of the web server. Some admins don't allow it; I don't know why. If most of the people who run the mirrors don't actually control the installation of their web server, this may be a problem. > In the meantime, I'm going to turn this stuff on again in the web repo > in the next few days [...] Thank you. Regards, Dima Dorfman dima@unixfreak.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message