Click to See Complete Forum and Search --> : User Firendly URLs


Markbad311
01-29-2007, 03:46 PM
Got a question I am ready too feed to the sharks! I am adding a blog to my site. Well a lot more then One. I am going to allow each user to have his or her own blog.


How would I make this something I can give friendly URLs to without writing 1000's of redirects?

A prime example is this. Both URLs pull the same info.


http://www.eriescene.com/blogname
http://www.blogs.eriescene.com/blog.php?id=123&action=view

The nature of this beast is for them to choose the blog url (just like MySpace) without creating actual folders (if possible) or me having to mess with httd.conf.


Any help regarding this matter is appreciated.

SpectreReturns
01-29-2007, 09:36 PM
HTTP variables are your best friend for this. What you'd do is make one blog page and all the user specific things would come from a database. You'd use an HTTP variable to retrieve this from the database, and voila, you have a per-use blog system.

bubbisthedog
01-29-2007, 09:51 PM
HTTP variables are your best friend for this. What you'd do is make one blog page and all the user specific things would come from a database. You'd use an HTTP variable to retrieve this from the database, and voila, you have a per-use blog system.

By HTTP variables, do you mean, for instance, ?user=100 and then use 100 to retrieve a record from the database?

Thanks,

bubbisthedog

NightShift58
01-30-2007, 02:07 AM
Take a look at: http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

This subject has come up in the forum a number of times and it may be worth it searching in here, too.

bokeh
01-30-2007, 12:20 PM
A prime example is this. Both URLs pull the same info.Yes, they both load a 404 not found page!

Markbad311
01-30-2007, 03:16 PM
I am going t5o do some searching around here. The only thing is resources such as the one linked to above tend to confuse the hell out of me simply because I have a hard time visualizing how certain techniques can apply to me. Bokeh, do you have any a good webdeveloper.com topic I can reference for this?

bokeh
01-30-2007, 03:30 PM
Bokeh, do you have any a good webdeveloper.com topic I can reference for this?http://forum.modrewrite.com/