/    Sign up×
Community /Pin to ProfileBookmark

User Firendly URLs

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.

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

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.

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@SpectreReturnsJan 30.2007 — 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.
Copy linkTweet thisAlerts:
@bubbisthedogJan 30.2007 — 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.[/QUOTE]

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

Thanks,

bubbisthedog
Copy linkTweet thisAlerts:
@NightShift58Jan 30.2007 — 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.
Copy linkTweet thisAlerts:
@bokehJan 30.2007 — A prime example is this. Both URLs pull the same info.[/QUOTE]Yes, they both load a 404 not found page!
Copy linkTweet thisAlerts:
@Markbad311authorJan 30.2007 — 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?
Copy linkTweet thisAlerts:
@bokehJan 30.2007 — Bokeh, do you have any a good webdeveloper.com topic I can reference for this?[/QUOTE]http://forum.modrewrite.com/
×

Success!

Help @Markbad311 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...