Creating virtual subdomains using MOD REWRITE
Posted: Thu Sep 10, 2009 8:48 pm
Hi,
I would like to have subdomains created on my site for every new registration. I want to let user determine what kind of url they prefer. For this I have a regular register & login page. Once the user validation is done, i redirect them to home. It is here that they get a chance to create their own url such as this;
if the user selects "username" as the choice then his url would be http://username.mysite.com and the webpages (http://username.mysite.com/[b]HOME/INDEX.html[/b] should come from the directory located here: http://www.mysite.com/users/pages/[b]HOME/INDEX.html [/b]
similarly, web page http://username.mysite.com/[b]ACCOUNT/EDIT/INDEX.html[/b] should come from directory located here: http://www.mysite.com/users/pages/[b]AC ... INDEX.html[/b]
I have been told that this can be done using mod write so I have made a couple of searches and found this code available on other sites. Take a look!
http://www.reconn.us/content/view/46/67/ and this http://www.webmasterworld.com/forum92/1884.htm
But I dont understand how do I activate this from PHP? I am new to PHP so your help will be appreciated.
Thank you,
I would like to have subdomains created on my site for every new registration. I want to let user determine what kind of url they prefer. For this I have a regular register & login page. Once the user validation is done, i redirect them to home. It is here that they get a chance to create their own url such as this;
if the user selects "username" as the choice then his url would be http://username.mysite.com and the webpages (http://username.mysite.com/[b]HOME/INDEX.html[/b] should come from the directory located here: http://www.mysite.com/users/pages/[b]HOME/INDEX.html [/b]
similarly, web page http://username.mysite.com/[b]ACCOUNT/EDIT/INDEX.html[/b] should come from directory located here: http://www.mysite.com/users/pages/[b]AC ... INDEX.html[/b]
I have been told that this can be done using mod write so I have made a couple of searches and found this code available on other sites. Take a look!
http://www.reconn.us/content/view/46/67/ and this http://www.webmasterworld.com/forum92/1884.htm
But I dont understand how do I activate this from PHP? I am new to PHP so your help will be appreciated.
Thank you,