dynamic subdomains with htaccess or php -
12-05-2011, 07:44 PM
I'm creating a new webservice that allows my users to have a personal speeddial page.
I want to have a dynamic subdomain for each user...
main site: site.com
user site: nickname.site.com
i'm searching for
1) a php command that creates subdomain automatically
2) a htaccess rule that forware addresses likes nickname.site.com to something like site.com/page.php?user=nickname
thanks to everyone and sorry for my bad english!
Don't thinks this is possible on 000webhost, I've tried several ways to do this, but meh, I can't seem to find a solution for 000webhost.
However, on paid hosting, you could try using wildcard subdomain (*.yourdomain.com) enter the star (*) as a subdomain and direct it to a folder, this way every subdomain you make will point to that folder (excluding other subdomains made with the subdomain creator thingy)
That's the easiest way I know.