redirect-missing

This is a small PHP script to help the transition between old and new websites. It's intended to be used as a directory index script and a 404 error page, and to systematically redirect URLs from an old path to a new one.

Configuration is done via an .htaccess files in the directory tree that you are redirecting from. For example:

# Do not change these
DirectoryIndex /url/to/redirect.php
ErrorDocument 401 /url/to/redirect.php
ErrorDocument 403 /url/to/redirect.php
ErrorDocument 404 /url/to/redirect.php

# set this to the Base URL you want to redirect from
# you can specify multiple Base URLs here, separate them with ";"
SetEnv REDIRECT_FROM "/old/content"

# set this to the Base URL you want to redirect to
# you can specify multiple Base URLs here, separate them with ";"
# if there are less here than in REDIRECT_FROM, the last one is repeated
SetEnv REDIRECT_TO "/new/content"

Files

Support

None. Sorry. Feel free to let me know if you find a problem, especially if you fix it too!
Steve Bennett