Create Subdomain

Jun 6, 2005

I would like to create a virtual subdomain with PHP (I think I should do this with mod_rewrite and .htaccess)

for example : >
(the 54 is a variable and is really a subdomain)

Now , what I should do?


How To Create Subdomain

Jan 14, 2010

i want to create a subdomain upon each user registration as how it is possible?

View 3 Replies View Related

Dynamically Create A Subdomain?

Feb 2, 2009

How can I dynamically create a subdomain for a user who register for my site?? Currently I'm using directories so if a user registers his url would be [URL]..I want it to be [URL]..

View 10 Replies View Related

How To Create A Subdomain With Description

Nov 3, 2010

complete script to create a subdomain with discription.

View 1 Replies View Related

Create Subdomain For Every User?

Jun 4, 2010

I am on shared server. I need to create subdomain for every user like [URL]

What id the preferred way to achieve this?

I found some tutorials online but steps given in those documents is for dedicated server.

View 2 Replies View Related

Use CPanel V11 Accelerated And Create A Subdomain?

May 19, 2009

I'm using cPanel v11 Accelerated and I created a subdomain but it's giving me this error when I try to request it:Bad Request (Invalid Hostname)When I was creating it i wrote the subdomain (for example and cPanel added it after my Document Root (home/public_html/mysubdomain) but that wasn't the folder I wanted for the subdomain so I changed it to another.

View 3 Replies View Related

Create Subdomain In Server Dynamically?

Jan 20, 2007

I would like to provide subdomains for my users while they are register into my site. For example, if a user is registering into my site then he selects xxx as his username and once he completed his registeration process successfully. A URL will be provided to that user for viewing his site . How can I create such subdomains dynamically in server using php.

View 5 Replies View Related

How To Create Subdomain For Each Member When They Registed On My Site!

Mar 24, 2006

For example, visit this site and try to register
one account. I have a account is thehetre. And this site create a sub
domain for me (include) :

So, how to doing like this in PHP or another web program language?

View 8 Replies View Related

Dynamically Create Subdomain Path For Images?

Feb 25, 2011

I'm looking for a PHP script that will rewrite my image paths to a subdomain. I currently have a script that performs this action, but it's difficult to use on my local development. Here is my current script:

and then for the image
<img src="<?php echo $IMG_BASE_URL1; ?>images/ui/logo.png">

This works great but it doesn't allow me to see the images locally while I'm developing the page. Is there a way to globally load the images from my subdomain without including <?php echo $IMG_BASE_URL1; ?> in the src path?

View 1 Replies View Related

Subdomain - Create Personal Sub Domain Programmatically?

Nov 7, 2010

if I like to create per user sub domain , how technically do I do this ? for example if user XXX is registered to my site and I what to associated him the sub domain [URL]..what is the procedure to make it ?

View 4 Replies View Related

Create A Subdomain For User And Everything Will Be Redirected To Page1?

Mar 5, 2010

would like to create a subdomain for user and everything will be redirected to page1.phpThe problem is that when there is a special character in the subdomain let say


View 3 Replies View Related

.htaccess - Redirect Subdomain To Particular Webpage And Process Subdomain Value

Jan 25, 2011

I am familiar with modifying htaccess files but not sure if the following is possible: Ultimately, I want to point users to 'imaginary' subdomains (those which do not exist) so that the subdomain can be parsed correctly with PHP and MySQL to find the particular member's information. For example:

When somebody goes to [URL]... currently, it shows the parent site including information on how to become a member. Once a person is a member, their 'unique' URl is: [URL]... ultimately, forcing the member to remember the question mark agent equals can be confusing along with the need to remember the proper capitalization and such. I would 'like' to achieve the following: [URL]... redirects to [URL]... (and index.php reads the 12345 like a $_GET function to properly lookup the iD, valid and retun response based on that.......

View 1 Replies View Related

Subdomain With PHP ?

Mar 20, 2006

How can I make subdomain in PHP ?

example :

I want change the link to this

I took for the answer in Mod_Rewrite?

View 8 Replies View Related

Get The Value Of Subdomain?

Apr 28, 2011

What is the easiest way to get the value of subdomain. For example, when browsing [URL] how to get it (like $_GET['q']) to put "word1" into an string.

View 10 Replies View Related

Creating Subdomain ?

Mar 28, 2003

I want to create a subdomain with the username and then upload files in the subdomain of user that the user can view his files directly from his subdomain...examle...if my site is and a user comes with username....anjali...then a subdomain should be created with the name and all the files of "anjali" user should be uploaded in that folder and that user should be able to directly view his files from the domain "" ...... i came to know that creating a subdomain is easier in php.....where to find its solution ?

View 2 Replies View Related

Creating A Subdomain

Mar 19, 2003

I want to create a subdomain with the username and then upload files in the subdomain of user that the user can view his files directly from his subdomain...examle...if my site is and a user comes with username....anjali...then a subdomain should be created with the name and all the files of "anjali" user should be uploaded in that folder and that user should be able to directly view his files from the domain "". i came to know that creating a subdomain is easier in php. where to find its solution ?

View 2 Replies View Related

Creating SubDomain With PHP

Sep 18, 2006

I have a registration form, when after registering, the user would get
a subdomain

I created a wildcard DNS which happened to redirect * to
the public_html folder.

I need to find a way to redirect eahc subdomain to it's user folder.

View 3 Replies View Related

Subdomain Creating

Mar 6, 2004

Is there any script to create subdomain automatically by the following way?

- create a form for clients fill out username, password
- when they submit form, the script will create a subdomain for them with their username

I can do it manually in CPanel or HELM.... but I want to do automatically with my form.

View 1 Replies View Related

Subdomain System

Apr 29, 2006

a project i'm going to undertake in the summer will require a user system which generates a virtual subdomain for users who register with my site. the user john signs up and is given a subdomain to access his account,, which when rendered in the browser will automatically bring up http://username=john or similar. How can this be acheived? I know can it can be done with .htaccess but won't that require configuration from myself each time a new user signs up.

View 1 Replies View Related

Use Session In Different Subdomain?

Aug 11, 2010

I need to use the same session in different subdomains.First I putphp_value [URL].... .htaccess file and upload it to root path.when I need to use sessions. I just call


Sometimes it works but sometimes it doesn't.I tested this and found that.If I go to login page the first time, then login and go to subdomain page. It works!If I go to subdomain page and click to login page and go back to subdomain page by javascript

View 3 Replies View Related

Function To Get The Subdomain Of A URL?

Mar 13, 2011

Is there a function in PHP to get the name of the subdomain? In the following example I would like to get the "en" part of the

View 4 Replies View Related

Get Domain Name From Subdomain?

Jul 29, 2009

I need to write a function to parse variables which contain domain names. It's best I explain this with an example, the variable could contain any of these things:


But when passed through my function all of these must return either or, the root domain name basically. I'm sure I've done this before but I've been searching Google for about 20 minutes and can't find anything. EDIT: Ignore the, presume that all domains going through this function have a 3 letter TLD.

View 12 Replies View Related

Use Function On A Subdomain?

Jan 26, 2010

Pardon the dummy question, but I am trying to breakdown a bunch of web pages into subdomains and bring them up using a settings.php page.The problem is that I can only find this for the settings page:

// WEBSITE Settings
// ******************************
// Domain Name (without: http://)
define('DOMAIN_NAME', '');

View 2 Replies View Related

The Right Regex For A Subdomain

Apr 24, 2011

I have a webapp, where people signup and get a sub domain under this app domain ([URL]) ... for each subdomain there is a db that is attached to it grammatically and have the same name as the subdomain.

what i need is the right regex that works with the subdomain and off course a db name ( mysql if it matters ), it's supposed to be lowercase & the length between 6 and 20 and the only allowed character is the " - ", also numbers are banned ... i tried many times but it always go bad, .. some like : /([a-z-]){6,20}/

View 4 Replies View Related

How To Find Subdomain From A Url

Feb 3, 2011


How do i find the subdomain from this via PHP

Such that $subdomain = 'company'

And $url = '/pages/users/add/'

View 2 Replies View Related

Creating Subdomain

Jul 29, 2007

Is there a way to create a subdomain via php? (Without creating a new host account via whm access).

View 14 Replies View Related

Subdomain Problem

Sep 17, 2007

I have a domain hosted on some provider (so I cannot configure apache myself ) and I create a subdomain, phisycally located under the same root like that :

--------------- images/
--------------- includes/
----------------------- style.css
----------------------- meta.php
----------------------- javascript.php
--------------- one/
------------------- index.php
--------------- two
--------------- three
--------------- sub-domain/
-------------------------- index.php

So my users ca now point to
The problem is I need when pointed to this sub domain, just display some page from MAIN domain as is.
Of course that can be done with redirect but I need to display contents of < one/index.php > at subdomain, not redirected.

I tried with include, like that :

include ("../one/index.php");

but all the file referenced in /one/index.php needs now to be referenced one level up ../ and if thats ok for php, html seems to don't like ( I cannot reference CSS and image file like ../include/style.css ).

Is there any sollution to display page pointed by /one/index.php directlly in subdomain, without modify originally file ? Or any other way to do it.

View 3 Replies View Related

Subdomain Names?

Sep 13, 2007

i have a website which is functional since 2006. But now i just want to add some new services like SMS and so on. i want users to type to access the page with the sms service. but i am not aware of how to make the subdomain i mean sms prefix.

View 1 Replies View Related

Add Subdomain Script?

Jun 5, 2011

Is there a way when a user signs up it can make a subdomain

View 6 Replies View Related

I Need A Subdomain Service Like

May 30, 2007

I want to give users of my site the option to register for a subdomain
redirection service. I scanned the Internet for some script, but
didn't really find anything that works. Tried the PHP script from and many others. So now I want to ask you
if you know of any script in PHP, Perl, Phyton that can accomplish
this task?

View 8 Replies View Related

Automatic Subdomain Creation

Nov 16, 2004

As the title suggests I am looking for a push in the right direction when it comes to a script that can autmatically generate subdomains.

I was wondering about if it was possible with php (if not then is there a scripting language that could do it?)

What are the security implications for it? Can it be made secure?

Are there any limitations on the type of server this could be done on?

View 1 Replies View Related

Link From Subdomain To Domain

Sep 28, 2005

How can I link a page in subdomain.domain.tld to a page in domain.tld? If I use an absolute link, it points to the root of the subdomain.

Note I don't want to link with http:// and I use Apache ...

View 1 Replies View Related

Managing Subdomain Dynamically

Oct 20, 2002

i don't know if php can do it, here is the picture, what i want is a cheaper way of doing this stuff,, cuz when i use the feature of the ISP, it will cost me $1/subdomain per month. any ideas?

View 2 Replies View Related

Include() File From Subdomain

Jun 8, 2007

I've been told I need to add an entry to the open_basedir in my httpd.include file to be able to access my main domain from a subdomain. I'm trying to use default PHP pages in my subdomains that are located in the main directory. In other words, I want to be able to use an include() in: that will pull files from:

I tried looking in the httpd.include file, but it's really confusing me. After an hour of researching, I found the vi command to edit files through SSH, but even that is confusing. Where should I put an entry into that will allow access to the main domain's files?

View 1 Replies View Related

Configure Subdomain In Apache

Sep 26, 2007

I am facing a great problem to configure a subdomain for my main site. I just want to have the URL like: let my sites name is and my subdomain is 123 , then the full URL of the subdomain should be like this i am using apache and windows 2003 server for my site. for now i have put the 123(subdomains folder) in the main site folder and the url is like

View 2 Replies View Related

Mvc - Subdomain Linked To Controller?

Jan 19, 2010

I have a site that operates in different geographical locations. Some example URLs for my site would be:

In these examples, my URL structure is translated to the following:

http://[location code][controller]/[event]/[extra parameters]

The script strips off the subdomain and checks it against the db for an acceptable location match, and then the blogs etc. in that location are displayed.

This is all fine and great, but now I am making a Terms of Use page, and I'd like it to have the URL:

/* which is translated to: */


So essentially, I'd like the subdomain to sometimes be a location code and sometimes a controller.

View 2 Replies View Related

Subdomain To New Domain Redirection?

Apr 7, 2011

I need simple code to do something like this.

For example my old site page is, I want to redirect to a new page, or to

So basically it will replace the domain and remove the .html.

could this be done on htaccess?

View 1 Replies View Related

Redirect Username To Subdomain?

Apr 21, 2011

i need to a script that it can do it[URL].. i think it possible with .htaccess file but i dont know it,

View 1 Replies View Related

Can't Access CPanel Subdomain?

Apr 29, 2011

I recently created a domain and sub-domain via cPanel, and for some reason I cannot access that sub-domain today. I say today, because I was able to access it the other day, but without making any changes, I am no longer able to. I was, however, able to access this site from an external IP, though this site [URL]

I have tried accessing with IE8 and FF4, without any luck. Also, I am sure the domain(s) have propagated, because some of these have been active and used for months.

View 1 Replies View Related

Subdomain Extract Without Regex?

Mar 17, 2011

is there a great way to extract subdomain with php without regex ?why without regex ? there are a lot of topic about this, one if them is Find out subdomain using Regular Expression in PHP the internet says it consumes memory a lot, if there is any consideration or you think better use regex ( maybe we use a lot of function to get this solution ) please comment below tooexample = 'static' = 'helloworld' = 'b.static.ak' = '' = ''

View 4 Replies View Related

Strategy For Subdomain Applications?

Aug 11, 2009

Not quite sure how to phrase this, but will do my best.I have an application (written in PHP) that I want to install somewhere like this:/app/build/1.0/Now, I want to be able to set up subdomains, something like this:


First, I want to put the least # files as possible in the subdomains (I am thinking just a config file), and point to the build folder for all php files.However, in the case where the subdomain has some sort of customization, I would like to be able to actually place the customized file in the subdomain, and then the app would use that (in other words, app first looks for local file, if it exists use it, otherwise, use the default build folder files).

View 1 Replies View Related

Detect Subdomain And Filter It?

Jul 17, 2010

I do have a domain search function. In search box you have the option to enter any kind of domain names. what I am looking into is how do I filter sub domain from search or else trim sub domain and keep only main. for example if a user entered [URL]... then that to be convert to [URL].. or it can be omitted from search. How can be possible with PHP? or any?

View 2 Replies View Related

Dynamic Subdomain With Htaccess?

Sep 14, 2010

Basically, what i wanna do change [URL] to [URL] However, I already have a ReWriteRule in htaccess to change [URL] to [URL]. Of course, in htaccess, I also have a rewrite condition to ignore actual folders and files. But if i create a subdomain for child, the server will actually create a physical folder for child, thus [URL] will be ignored by the RewriteRule completely. So if possible, I want to change [URL] straight into [URL] Is this achievable through htaccess or I must set the subdomains in my cpanel?

View 1 Replies View Related

Check For Subdomain In Parse_url?

Sep 17, 2010

I am trying to write a function to just get the users profile id or username from Facebook. They enter there url into a form then I'm trying to figure out if it's a Facebook profile page or other page. The problem is that if they enter an app page or other page that has a subdomain I would like to ignore that request.

Right now I have:

$author_url =;
$parse_author_url = (parse_url($author_url));
$parse_author_url_q = $parse_author_url['query'];


This works if $author_url has "id=" then use that as the profile id if not then it must be a user name or page name so use that instead. I need to run one more check that if the url contains facebook but is a subdomain ignore it. I belive I can do that in the first preg_match preg_match("/facebook/i",$author_url)

View 1 Replies View Related

Routing Depending On The Subdomain?

Jan 14, 2010

I am quite new to kohana. How best to do so the controller was chosen based on the subdomain. For example: -> Controller: siteroot. Method: run -> Controller: adminsite. Method: run -> Controller: moderatorsite. Method: run -> Controller: directorsite. Method: run
default: supervisor: partnersite. Method: run

The run method performs an action for these sub-domains, and will bring a page from the overseers modules.

View 3 Replies View Related