PDA

View Full Version : How do you create subdomains using PHP?



jackthomas087
07-20-2016, 06:25 AM
Hello folks,

I need to know, How do you create sub domains using PHP?

Is their any way to do it in easy way ????

mani ge3e
07-21-2016, 10:25 AM
I would like to know how do I create subdomains using
Basically, I want a new user that signs up to my website to have a homepage: username.domain.com
as well as sub directories as: username.domain.com/journal

Thanks in advance,

rohit
07-23-2016, 03:27 AM
Hello,

You can create a virtual domain by using .htaccess file and you need to set some little things in control panel.

by using .htaccess file you can crate like as a under mention example.

http://www.domain.com/?a=user --> http://user.domain.com/

marisalewis24
07-26-2016, 12:40 PM
You will need to configure the apache virtual host to accept requests for multiple domains

See the Apache documentation - Using Name Based Virtual Hosts

<VirtualHost *:80>
ServerName www.example.com
ServerAlias example.com *.example.com
DocumentRoot /www/domain
</VirtualHost>

Adding the wildcard subdomain *.example.com, your PHP application will receive all requests for any domain below example.com, ie garbage.example.com, busted.example.com, llama.example.com, etc.

gsmxperts
08-11-2016, 07:30 AM
The discussion over the use of sub sector is an old one and even nowadays separates the SEO group into two warring sections. Yes, sub doamins are not exactly very favourable.

seoexpert147
08-19-2016, 02:33 AM
Hi
i try to find way for user to register in my web. they just need to fill in their name,phone,email address and subdomain that need to create.
this information will store in database and PHP will execute the command to create subdomain. is it possible to do that?
my webhost control panel are not using cpanel , my domain i already point using DO DNS. thanks

seoexpert147
08-20-2016, 02:20 AM
Dynamic subdomains like Google Blogger and Tumblr.com, I know most of the people are looking for better solution. Today I want to explain how to achieve this using .htaccess with PHP. I especially love to write .htaccess file, using this you can easily host multiple domains in single server. This dynamic subdomain system is the base for cloud services, soon I will come with new tutorial. I hope this post will solve your problem, please take a look this live demo.

CarolinaFlores
08-31-2016, 08:24 AM
I have no idea about it please suggest me..