On Saturday 02 Jun 2012, Raakesh kumar wrote:
> Dear All,
> I am stuck to a problem and that is, i am working on a project which
> requires user registration like any other website/social networks
> have and then after user registration they want a separate subdomain
> like http://userName.theirWebsite.com
> 
> Now i don't understand how is it possible to create a sub domain
> using Php only... Do i need any other program or anything to do
> this?? My other question is, even if i get anything to do this won't
> it be a security threat if any person gets the server credentials,
> as i will create a sub domain for him/her??

One way to achieve this would be to put up a wildcard DNS record for 
*.example.com pointing to your web server.  Then in the server either 
create a virtual host for each user, or use mod_rewrite to redirect 
user.example.com to example.com/~user (or something).

Not saying anything about security, that's a completely different ball 
game.  Will consult for trifling fee, please see my mail dated 
2012-05-28 for details.

> As i guess it's not a good idea.. so is there any method using
> .htaccess or anyhow to fulfill this requirement??
> Need suggestions

With the appropriate configuration, you can add add rewrite rules in 
.htaccess AFAIR.

I could be wrong, but from your mail I get the impression that you don't 
have a good handle on either the problem or the possible solutions.  
Suggest reading a lot and chatting with experienced people.

BTW, one ? is usually enough to terminate a question.

Regards,

-- Raj
-- 
Raj Mathur                          || [email protected]   || GPG:
http://otheronepercent.blogspot.com || http://kandalaya.org || CC68
It is the mind that moves           || http://schizoid.in   || D17F

_______________________________________________
Ilugd mailing list
[email protected]
http://frodo.hserus.net/mailman/listinfo/ilugd

Reply via email to