Hi jdblewitt,
I started by googling for more information for you. I searched for, "redirect .htaccess fake folders".
I used the information I found on this page to help solve your question:
Create fake subdirectories with htaccess and php AND keep existing directories as is.
I put in place the following in my .htaccess:
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
I then created the index.php with the following code:
PHP Code:
<h1>This is index.php</h1>
<p>You are trying to access: <? echo $_SERVER['REQUEST_URI']; ?><p>
<?
// explode the url by /
$exploded_url = explode("/",$_SERVER['REQUEST_URI']);
// get the number of items in the new array
$array_size = sizeof($exploded_url);
// in this URL: book-clubs/doubleday/authors/james-patterson/index.php
// we know that the author name is the second to last item in the path
// so that equals $array_size - 1
$author_name = $exploded_url[$array_size - 2];
$book_club = $exploded_url[$array_size - 4];
?>
<p>The author's name is <? echo $author_name; ?></p>
<p>The book club name is <? echo $book_club; ?></p>
You can then use the $author_name and $book_club variables to call your database so you can display the correct content.
The above is bare minimum, and works. You can test it here:
http://blog.bradmarkle.com/testing/f...rson/index.php
One .htaccess file is all that you should need.
Let me know if this doesn't help.
Thanks,
- Brad