Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Apr 2001 21:45:46 -0700
From:      Dima Dorfman <dima@unixfreak.org>
To:        Nik Clayton <nik@freebsd.org>
Cc:        Rasmus Kaj <kaj@hq.room33.com>, doc@FreeBSD.ORG, www@freebsd.org
Subject:   Re: http://www.freebsd.org/docs/, /FAQ/, /handbook/, and others 
Message-ID:  <20010410044546.1E6C63E09@bazooka.unixfreak.org>
In-Reply-To: <20010409152011.B13162@canyon.nothing-going-on.org>; from nik@freebsd.org on "Mon, 9 Apr 2001 15:20:11 %2B0100"

next in thread | previous in thread | raw e-mail | index | archive | help
Nik Clayton <nik@freebsd.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010410044546.1E6C63E09>