Passing id through rewrite without showing?

I’m trying to figure out how to pass an ID to my php page without showing the ID in the pretty url!?

I have a url like this:
mypage.com/13/this-is-a-test

I want the “/13/” out of the url, but at the same time its’ the ID 13 that is important for my page to show up correctly…

How do I do that?

JM,

REMOVE the 13/ and have your query use the remainder to search for the {title?} rather than the {id} of the record. I’ve done that for http://wilderness-wally.com and it works a treat (but I use _'s rather than -'s to replace spaces BECAUSE a hyphen is more likely to be in a title).

Of course, you can use a RewriteMap to do the same thing but (a) that REQUIRES access to the httpd.conf and (b) doesn’t do it any faster. You can also simulate a RewriteMap by redirecting to a script to parse the URI for you.

WW’s site uses a single script for all those “stories” he has online so, unless the URI is a directory or a file, it’s redirected to the script where the title has its spaces restored so it can query the db for the correct story. Easy-peasy!

Regards,

DK

jm,

Sorry, the titles are REQUIRED to be unique. That should be enforced by the db when uploading a new record.

Regards,

DK

Well, what if 2 records have the same title?