homepage Welcome to WebmasterWorld Guest from 54.161.185.244
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Best way to implement non-numeric ids
frances

10+ Year Member



 
Msg#: 3510309 posted 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.

Thanks

 

jdMorgan

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



 
Msg#: 3510309 posted 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.

Jim

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved