?id=stuff to stuff.html

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

?id=stuff to stuff.html

Post by m2babaey »

Hi
I know how to handle links like http://domain.com/article.php?title=thi ... icle-title
But what can I do to do the same job ( querying the database for that article) when users want to load this link: http://domain.com/articles/this-is-article-title.html
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Look into Apache's mod_rewrite.
I've also written a fairly simply URL Parsing tutorial to create links such as the ones I've made on Volectricity. It's purely database-driven, however, and may be more than you're after.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

mod_rewrite.

We've got many many many threads on the subject.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

superdezign wrote:Look into Apache's mod_rewrite.
I've also written a fairly simply URL Parsing tutorial to create links such as the ones I've made on Volectricity. It's purely database-driven, however, and may be more than you're after.
I like the tutorial super. Very well written.
Post Reply