Tricky mod_rewrite challenge

Posted by And Finally on Pro Webmasters See other posts from Pro Webmasters or by And Finally
Published on 2011-06-25T07:30:38Z Indexed on 2011/06/25 16:30 UTC
Read the original article Hit count: 196

Filed under:
|
|
|
|

I list about 9,000 records on my little site. At the moment I'm showing them with a dynamic page, like

http://domain.com/records.php?id=019031

But I'd like to start using meaningful URLs like this one on Amazon

http://www.amazon.co.uk/Library-Mythology-Oxford-Worlds-Classics/dp/0199536325

where the title string on the root level gets ignored and requests are redirected to the records.php page, which accepts the ID as usual.

Does anybody know how I could achieve that with mod_rewrite? I'm wondering how I'd deal with requests to my other root-level pages, like http://domain.com/contact.php, that I don't want to redirect to the records page.

© Pro Webmasters or respective owner

Related posts about apache

Related posts about redirects