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

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

Notifications You must be signed in to change notification settings

LiftCookbook/nginx-redirects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published