Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be a little more explicit about what we need to make routing work #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .htaccess
Expand Up @@ -2,10 +2,11 @@ RewriteEngine on
RewriteBase /

Options +MultiViews
AddType application/x-httpd-php .php

RewriteCond %{HTTP_HOST} ^www\.webtypography\.net$
RewriteRule (.*) http://webtypography.net/$1 [R=Permanent]

RewriteRule ^.+/([0-9]+\.[0-9]+\.[0-9]+)$ $1 [R=Permanent]
RewriteRule ^.+/([0-9]+\.[0-9]+\.[0-9]+)/$ $1 [R=Permanent]
RewriteRule ^([0-9]+\.[0-9]+\.[0-9]+)$ item.php?item_num=$1
RewriteRule ^([0-9]+\.[0-9]+\.[0-9]+)$ item.php?item_num=$1
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -11,6 +11,8 @@ The markup still holds up but you might consider the CSS to be a bit... 2005. Th

The site runs on PHP and probably requires PHP 5 to be safe (although I suspect PHP 4 will work just fine too). That's all really. Just download the zip into a folder and set yourself up with a virtual host and you're away. If you want the webfonts to work, you'll need to use the domain "webtypography.dev" as your virtual hostname.

The expectation is that the site will be served by Apache or something that understansd the .htaccess file in the root. This requires mod_rewrite and mod_negotiation to be enabled in order to route requests appropriately.

## Adding new items

The site builds upon the individual guidelines written in Bringhurst's book. To add a new guideline, you should add an entry in the PHP array in `/includes/data.inc.php` and then create an HTML file with the main content in the `/items` folder.