Jump to content

Archived

This topic is now archived and is closed to further replies.

keenk

user directories management

Recommended Posts

this is a slightly more general question but as i am programming it in php, it is related.

i am wondering what is the best way to create clean user-specific urls for each user registered on a website.  i explain.  take del.icio.us for example.  a user's main url is 'http://del.icio.us/username' and match with its rss feed 'http://del.icio.us/rss/username'.  i am wondering if when the user registers, different folders are created (/username, and /rss/username) with files in them.  how does it work?

Share this post


Link to post
Share on other sites
I'm not sure exactily how that site does it, but its probably not individual directories.
check out this article at sitepoint

http://www.sitepoint.com/article/search-engine-friendly-urls

Share this post


Link to post
Share on other sites
They probably use .htaccess to do this.

Share this post


Link to post
Share on other sites
thanks that's exactly what i needed.

if del.icio.us use .htaccess by redirecting error pages, they must have one hell of an error log.

Share this post


Link to post
Share on other sites
Nope, they probably use [url=http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html]mod_rewrite[/url], an addon for Apache which allows for rewriting of URLs to the backend.

Note that when you rewrite a URL e.g: [b]/user3/[/b] to backend [b]?user.php?id=3[/b] that the browser will look for images etc. in www.site.com/user3/ so you have to hardcode your resources. It's handy to know before you start.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.