I'm very pleased to announce the release of our new website and documentation using the new toolchain with Hugo and AsciiDoctor. To get more information about the new toolchain please read the FreeBSD Documentation Project Primer[1], Hugo docs[2] and AsciiDoctor docs[3]. Acknowledgment: Benedict Reuschling <bcr@> Glen Barber <gjb@> Hiroki Sato <hrs@> Li-Wen Hsu <lwhsu@> Sean Chittenden <seanc@> The FreeBSD Foundation [1] https://docs.FreeBSD.org/en/books/fdp-primer/ [2] https://gohugo.io/documentation/ [3] https://docs.asciidoctor.org/home/ Approved by: doceng, core
32 lines
641 B
Perl
Executable file
32 lines
641 B
Perl
Executable file
#!/usr/bin/perl -T
|
|
# (c) 1996-2011 Wolfram Schneider. Public domain.
|
|
#
|
|
# FreeBSD WWW mirror redirect
|
|
#
|
|
# $FreeBSD$
|
|
|
|
use CGI;
|
|
use strict;
|
|
use warnings;
|
|
|
|
my $debug = 1;
|
|
my $master_url = 'https://www.freebsd.org/';
|
|
|
|
my $q = new CGI;
|
|
my $url = $q->param('goto') || "";
|
|
|
|
if ( $url =~ m,^http://[a-z0-9\.]+\.freebsd\.org/?$,i
|
|
|| $url =~ m,^http://[a-z0-9\.]+\.freebsd\.org/www\.FreeBSD\.org/(data)?$,i
|
|
|| $url =~ m,^http://(freebsd\.unixtech\.be|www\.gufi\.org/mirrors/www.freebsd.org/data)/$,i
|
|
)
|
|
{
|
|
# ok
|
|
}
|
|
|
|
else {
|
|
warn "Ignore illegal redirect URL: $url\n" if $debug;
|
|
$url = $master_url;
|
|
}
|
|
|
|
print $q->redirect($url);
|
|
|