Skip to content

Instantly share code, notes, and snippets.

@ericholscher
Created August 27, 2010 17:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericholscher/553773 to your computer and use it in GitHub Desktop.
Save ericholscher/553773 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name rtfd.org *.rtfd.org;
if ($host ~* (.*)\.rtfd\.org) {
set $slug $1;
rewrite ^(.*)$ http://$slug.readthedocs.org;
}
rewrite ^/(\w+)$ http://$1.readthedocs.org/;
rewrite ^(.*)$ http://readthedocs.org/;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment