Without turning on mod_rewrite it is quite possible to control subdirectory redirection. Note that in this example, I'm using a directory named "redirect" that is in the root level of your web site. For example, this would work for http://www.yourwebsite.com/redirect/redirectionstring To customize, replace "/redirect/" here with "/news/" or whatever the name of the folder it is in.

1. First make sure that AllowOverride in your httpd.conf is set to allow the following You might test it with AllowOverride All, but lock this down appropriately later. Check the Apache docs on AllowOverride for details on security implications.

2. Add a .htaccess file in the directory you want to set up for redirection:


    ErrorDocument 401 /redirect/index.php ErrorDocument 403 /redirect/index.php ErrorDocument 404 /redirect/index.php

3. put a index.php file in the redirect/ directory:


    < ?php $redirectkey=addslashes(str_replace("/redirect/","",$REQUEST_URI)) ?>
This is just a start, you would use $redirectkey as the basis for your query which then can output to: header("Location: $queryresult");

<<

PHP Consulting, Inc.
11649 Westwood Lane
Omaha, Nebraska 68144
United States
mat@phpconsulting.com