announcing, short manual page URLs

Constantine A. Murenin cnst++ at
Tue Feb 19 08:27:03 UTC 2013

Dear freebsd-{chat,current,doc}@,

I would like to announce and introduce <URL:>, 
a deterministic URL shortener for BSD manual pages, 
written entirely in nginx.conf.

It supports several address schemes, for example:


Source code for the whole is available at:

Specifically, the following currently controls FreeBSD rewriting:

	location /FreeBSD {	rewrite	^/FreeBSD(/.*)?$	/f$1;	}
	location /f {
		set	$fb	"";
		set	$fs	"&sektion=";
		rewrite	^/freebsd(/.*)?$	/.$1;
		rewrite	^/./([^/.]+)/([^/]+)$		$fb$2$fs$1	redirect;
		rewrite	^/./([^/]+)\.([1-9])$		$fb$1$fs$2	redirect;
		rewrite	^/./([^/]+)$			$fb$1$fs	redirect;
		rewrite	^/./?$	/	last;
		return	404;

Translation: "/FreeBSD" and "/freebsd" get rewritten to "/f" internally, 
without any extra replies to the user, and then the rest of the URI is 
analysed, and a "302 Found" redirect is finally issued to the user.

Pages like redirect to the main "/" page internally, 
without affecting the URL that's visible to the user, making it easier 
to keep a starting page specifically for one BSD.

Questions, comments and suggestions are very welcome.  
Available through IPv4 and IPv6.  

Best regards,

More information about the freebsd-doc mailing list