Welcome to WebmasterWorld Guest from 18.104.22.168 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Pubcon Platinum Sponsor 2014
Best way to implement non-numeric ids frances msg:3510311 4:29 am on Nov 21, 2007 (gmt 0) This is a general question.
On past sites I have created, I have used numeric ids in urls and rewritten them with mod rewrite eg www.somesite.com/somepage.php?someid=4 would become www.somesite.com/somepage/4.html
This time I wanted to get rid of the numbers and I am not sure of the best way to do this.
I think I would like to use text ids eg www.somesite.com/somepage.php?someid=page_name and rewrite that. But would this make database access much slower?
Or is a rewritemap a better way?
I wondered if anyone had any experience of these sort of issues and could offer some advice.
jdMorgan msg:3510579 3:33 pm on Nov 21, 2007 (gmt 0)
If you have httpd.conf access, I would certainly recommend the RewriteMap approach if you need to rewrite from "text-string IDs" to numeric IDs. However, you could also just lookup the text-strings within your script, and so avoid the need for a RewriteMap. As long as your database is set up with lookup keys based on the page-name, the lookup time should not increase dramatically.