Skip to content
This repository was archived by the owner on Jun 10, 2018. It is now read-only.
LiftCookbookPublic archive

About

Redirect mapping for Nginx to map cookbook pages to O'Reilly Atlas

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Redirects for the Lift Cookbook

Problem

At first the Cookbook was published at URLs like /Downloading and running Lift.html.

Then it was published at URLs like /#DownloadAndRun.

Now it runs over at O'Reilly's Atlas server, with URLs like ch01.html#DownloadAndRun.

We want to keep the URLs working as best we can.

Solution

  • A set of nginx redirects for the first version of the site.

  • A single HTML page with JavaScript to pick out the client-site anchor references and redirect based on the anchor.

The nginx redirects are in nginx.conf, between # Re-writes from ... and # End of cookbook rewrites. That file is the default nginx config which serves up an index.html page.

The JavaScript is in index.html.

Tests

And the following should all end up at the home page (http://chimera.labs.oreilly.com/books/1234000000030/index.html):

About

Redirect mapping for Nginx to map cookbook pages to O'Reilly Atlas

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors