Best unofficial Apache Server developers community |
|
Fraternal greetings StackOverflowers.. 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
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. Thank you! Fred
posted via StackOverflow
|
|
 
|
Try this in your root's .htaccess:
http://example.com/foo-bar/42 will be rewritten to http://example.com/records.php?id=42 It wont affect URLs like |