473,472 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to create a subdomain in php

13 New Member
i want to create a subdomain upon each user registration as

user.example.com

how it is possible?

thanks
Jan 14 '10 #1
3 2689
Dormilich
8,658 Recognized Expert Moderator Expert
if you’re using apache, you could use mod_rewrite to map user.example.org to www.example.org/user/ or www.example.org/?id=user
Jan 14 '10 #2
Markus
6,050 Recognized Expert Expert
PHP does not control the server, it only runs on it. However, PHP can be used to modify the configuration files for the server. The modifications will depend upon the server (Apache, IIS, etc.).
Jan 14 '10 #3
nilayanand
10 New Member
Configure your apache/other-web-server for wildcard subdomain. Then your PHP script can read the subdomain using $_SERVER['HTTP_HOST] and can serve the data accordingly.
Jan 16 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: vtxr1300 | last post by:
I have a web site that allows users to register. When they register, I'd like to create a subdomain that points to their profile page. Does anyone know how to do this in IIS through a c# asp.net...
1
by: thomas | last post by:
Hello all, It seems like subdomain forwarding prevents ASP.Net session state from working correctly. Example: two websites http://www.jgphotographers.com/test and...
0
by: anj.smart | last post by:
Hi:-I have my own webspace www.domain.com. When any new user register on to my site, a new url name www.subdomain.domain.com or www.domain.subdomain.com should be provided to it. I want to provide...
0
by: anjupt | last post by:
Hi, I have wriiten a vb script to create a subdomain and have called that vbscript in Asp.net program.The problem i am not getting the result as in the subdomain is not getting created and there...
0
by: Greg | last post by:
Is it possible for authentication using asp.net membership to persist from a site to a subdomain? The scenario I want to provide is: User browses to the page somesite.com and logs in. User...
12
by: Tina | last post by:
Our company domain, say, wombat.com needs to create several subdomains: support, training, and purchase are three of the subdomains needed. So when someone browses to //training.wombat.com they...
3
by: a2rodger | last post by:
I am using the following function and parse_url() to attempt to grab the subdomain from my sites url function selfURL() { $s = empty($_SERVER) ? '' : ($_SERVER == "on") ? "s" : ""; $protocol =...
0
by: devilsjunk | last post by:
Hello Everybody, In my web application I have created an interface where, if any user register then a subdomain will be created with the user name of the user link this manner E.G. :-...
1
by: Josh | last post by:
I have a question about subdomains. I would like my website to have subdomains that essentially show my regular main website, except that the subdomain passes as a variable on all pages so that I...
7
by: lmeyers | last post by:
I implemented a URL rewriter which worked reasonably well, but now I am creating other sites on the same server (single IP). Because IIS will not accept subdomain wildcards (*.subdomain.com), it...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.