TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   Users Subdomains (http://www.talkphp.com/general/4745-users-subdomains.html)

Mike 07-16-2009 09:19 PM

Users Subdomains
 
hi everyone, here i am with another question for you guys.

I have a website, which is a community of users, i want the usersto have their own user domain by example:

pinkgaydragon.mydomain.com

what is the best way and how can i manage this? with mod_rewrite or what?

Village Idiot 07-16-2009 09:36 PM

Do you have control over your DNS? You need to wildcard everything to once place to start doing that.

Here is a rule that should work which I found on google. I've never done this myself so I can't give you a definitive answer.
Code:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.yourwebsite.com
RewriteCond %{HTTP_HOST} ([^.]+)\.yourwebsite.com
RewriteRule ^(.*)$ /path_to_your_site/httpdocs/work_out.php?url=%1


codefreek 07-17-2009 03:33 AM

Do you have Cpanel ? if so,
With Cpanel

or:
Without Cpanel



-Cf


All times are GMT. The time now is 08:59 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0