Link to home
Start Free TrialLog in
Avatar of its_ns_04
its_ns_04

asked on

personalized URL (PURL)

Hi,

I want something called Personalized URL, so that if a user "Sam" types www.mydomain.com/sam, he gets his page and say if some other user "Nancy" types www.mydomain.com/nancy, she gets her own page.

How do I implement it ? I am totally confused...
Avatar of yfastud
yfastud
Flag of United States of America image

you need to use VirtualHosts to setup (sub)domains, follow this
http://blog.jlbn.net/?p=23
and if you don't use wampserver, just replace the paths w/ your desire ones ;)
ASKER CERTIFIED SOLUTION
Avatar of its_ns_04
its_ns_04

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of its_ns_04
its_ns_04

ASKER

.
First you need to set up a wildcard dns entry *.domain.com.

Then use .htaccess to capture subdomain and rewrite it.
Correct me if I'm still wrong, but let me clarify this since .htaccess alone can NOT get the data out from database and also can NOT substitute VirtualHosts to setup user's base document roots.
1. If you only want to show the user's information in only 1 page and nothing goes further, you need to setup your own script which will capture the username which is part of url when the user input the url in browser, then that script will look up in database and display the information to that 1 page
2. However, if you want that user's info page will be the first page and from there the user will go further but still remain in his/her directory path, you still need to create the script described above, and you also need to setup wildcard for dns and vh, of course if your live host or you've already setup to allow wildcard, then use .htaccess to redirect users to proper directory based on input url