Creating virtual subdomains using MOD REWRITE

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
gimpact
Forum Commoner
Posts: 65
Joined: Tue Jun 16, 2009 11:08 pm

Creating virtual subdomains using MOD REWRITE

Post by gimpact »

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,
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Creating virtual subdomains using MOD REWRITE

Post by John Cartwright »

Mod rewrite alone would not be able to accomplish this, and as I believe one of those articles mention, involve configuring your web server for wildcard DNS entries.

Moved to Installation and Configuration.
gimpact
Forum Commoner
Posts: 65
Joined: Tue Jun 16, 2009 11:08 pm

Re: Creating virtual subdomains using MOD REWRITE

Post by gimpact »

Thank you,
Post Reply