Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Best way to implement non-numeric ids



4:29 am on Nov 21, 2007 (gmt 0)

10+ Year Member

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.



3:33 pm on Nov 21, 2007 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

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.



Featured Threads

Hot Threads This Week

Hot Threads This Month