Jump to content

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?
Link to comment
https://forums.phpfreaks.com/topic/14522-user-directories-management/
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.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.