Using a 404 redirect to use folders and index files that don't exist

LincLinc OwnerDetroit Icrontian
edited July 2006 in Internet & Media
I would like to be able to make pages redirect dynamically.

I'd like to be able to have pages named "page1", "page2", and "page3" in my database. When a user goes to www.mysite.com/page1 (or page2 or page3), I'd like it to automatically display the contents of page1 (or 2 or 3). However, I'd like to do this without physically having a file in this location (thereby allowing me to dynamically add pages).

As I understand it, I can redirect the imminent 404 error with the .htaccess file. Is there a way to then grab the URL with a script to figure out the desired location and display that page?
Sign In or Register to comment.