| Private Hosting Questions about VPS, dedicated servers and colocation. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
|
|
#1 (permalink) |
|
All Ur Base R Belong 2 Us
Excelling Contributor
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
|
Apache/BIND Question
I'm interested in setting up dynamic subdomains for one of the websites on my server. What I'm hoping to set up is that (name).mydomain.com redirects to mydomain.com/filename.php?variablename=(name)
Anyone have any advice on how to set this up? |
|
|
|
|
|
#2 (permalink) |
|
after g, before i
Resident.
Joined in Jul 2004
Lives in N,BC,CA
8,079 posts
Gave thanks: 48
Thanked 131 times
|
I think you can do this in CPanel, after you make a subdomain, you can redirect it to the URL you want.
Steps: 1. Make subdomain. 2. Choose subdomain below, and hit "Setup Redirection" 3. Put in URL, hit apply. That should be right anyways. |
|
|
|
|
|
#3 (permalink) | |
|
All Ur Base R Belong 2 Us
Excelling Contributor
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
|
Quote:
I've been reading in the Apache Documentation online and I don't fully understand the documentation. I've read an implementation using php on one website (liquidpulse), but I'm trying to set it up strictly using just server settings. |
|
|
|
|
|
|
#5 (permalink) | |
|
All Ur Base R Belong 2 Us
Excelling Contributor
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
|
Quote:
![]() |
|
|
|
|
|
|
#7 (permalink) |
|
Registered User
Comfy Contributor
Joined in Dec 2004
150 posts
Gave thanks: 1
Thanked 1 Time in 1 Post
|
Can you tell us how?
__________________
PeconiHosting.com <-- new design ![]() Wicked-Templates.com - High Quality Web Templates Peconi.com - My Personal Website BlackPearl Dedicated Server 20% discount on hosting 4 students! |
|
|
|
|
|
#8 (permalink) | |
|
minor deity
Super #1
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,387 posts
Gave thanks: 28
Thanked 94 times
|
Quote:
John
__________________
Proud to be a Surmunity Mod! XEON Make a fundamental difference! My Sites: Curious about Brewing Beer? Join the community! >>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax Get into an Art museum Victorian London It's your brain -ON WEB - mybrainhost.com (under development) What SHOULD Government do? Much Less than it Does! |
|
|
|
|
|
|
#9 (permalink) |
|
All Ur Base R Belong 2 Us
Excelling Contributor
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
|
I hope I explain this well enough because I know I'm not the greatest person when it comes to technical explanations. My explanation requires that you have the WebHostManager from CPanel.Net
First Step: In WHM, choose DNS Functions, and select Edit A DNS Zone. Select the domain to which you wish to add these dynamic subdomains onto and then click Edit. Scroll down to where it says "Add Entries Below This Line". In the first field enter the wildcard character (*), leave the areas where it says "14400 IN A" as is and in the next field put the IP address for the site. After you've done this, click Save. Second Step: You will need to open up your httpd.conf file, and find where the <VirtualHost></VirtualHost> information is for the domain you wish to work with. Add into this VirtualHost area the following: ServerAlias *.yourdomainname.ext RewriteEngine on RewriteCond %{HTTP_HOST} !^domainname\.ext$ RewriteCond %{HTTP_HOST} !^www\.domainname\.ext$ RewriteCond %{HTTP_HOST} ^(.+)\.crushspot\.ext$ RewriteRule . http://www.domainname.ext/filename.php?variablename=%1 [R] Of course the rewrite rule may be a bit different depending upon what you are intended to do, but that's the basic gist of it. Final Step: Restart Apache and BIND |
|
|
|