TT Web Site Manager To redirect or not to redirect?
To redirect or not to redirect?

The TT Web Site Manager has been designed to operate in two ways, depending whether you wish to try to conceal the fact that your web server is using it. The page build script can either be called directly with the page specified by passing a variable or all requests that do not return static content can be redirected to it. This allows it to work out the page requested from the original URL called so your URLs look like they are pointing to real files. The second option is not proven to be reliable in this release of the TT Web Site Manager though so depending on your server setup it is quite likely that you may not want to choose that route. This page shows you how to configure the TT Web Site Manager in either way.

If you do not want to redirect to build.php, you will have to refer to TT Web Site Manager pages within your code as links to build.php with your page specified as a variable called tt_page.
For example: http://yourhostname/build.php?tt_page=news.html
In addition, your HTML forms would have to include the variable, something like this:

<form method="post" action="build.php">
<input type="hidden" name="tt_page" value="news.html">
(rest of form code here)

You may also need a default.php script which redirects to build.php to serve a home page if the site is only called by its URL and its home page is a TT Web Site Manager page.

If you wish to redirect requests to build.php, here follows instructions on how to do it. This information applies to Apache and compatible web servers only. Consult the documentation for your web server if the methods described here are not supported.
If you would like your TT Web Site Manager to use virtual URLs then you will need to configure your web server to redirect 404 errors to the page build script. In this way, if for example you ask for a file called index.html and no such physical file exists the request is passed to the page build script which can then look in the database to see if there is a TT Web Site Manager page to return. This can provide a better interface than calling the page by passing the name to the build script as a variable.

There are two ways to redirect 404 errors to build.php on an Apache server. You can create a .htaccess file in the root with an entry redirecting traffic, or you can add the redirection entry to your httpd.conf file. In either way the entry will be the same but unless you really know what you are doing it is a lot safer to use a .htaccess file than to edit your httpd.conf file, particularly if you share a server with other users. You need to create a file called .htaccess in the same location as your copy of build.php, with the following entry in it.

ErrorDocument 404 build.php

How to install the TT Web Site Manager (2) Contents Using the TT Web Site Manager