The txt.page Readme.
SETUP AND USAGE
1) Create your header and footer templates or use the ones provided. Place them in your
/template directory. To insert 'breadcrumbs' in your header or footer put
<?php echo $breadcrumbs; ?>
where you would like the breadcrumbs to appear.
2) Create your content and put them into .txt files inside the /pages directory. There must
be a page called invalid.txt (for invalid page requests) and index.txt (for users not
requesting a particular page).
3) Open setup.php and add a whitelist entry for every page you want to allow txt.page to
show. In-depth instructions on how to add new whitelist entries are included in
setup.php.
4) Upload everything to your server. [index.php] shows the contents of index.txt sandwiched
by your header and footer templates, while [index.php?page=blah] shows the contents of
blah.txt sandwiched by your header and footer templates as long as 'blah' is in your
whitelist. If not, then invalid.txt is shown in its stead.
WHY DO I HAVE TO USE THE WHITELIST?
Because the whitelist is a VERY important security feature. It limits the pages users have
access to; without it attackers could view any page they wanted. Other security measures
exist, such as stripping directories and extensions from the query string and hardcoding
the '/pages' and '.txt' to the stripped query to prevent custom searches (an attacker
cannot use [index.php?page=/../.htpasswd] to access your site's passwords because txt.page
would try to show [./pages//../.htpasswd.txt], which is of course an invalid directory
address and will result in an error), but a web application can never be too secure.
Anyway, the whitelist allows you to set breadcrumbs for individual pages to show readers
where they are within the document. The whitelist is worth the one-time hassle of setting
it up.