Go Back   HondaSwap Forums > Members' Corner > Computers, Games, Electronics etc
Facebook Twitter

Pointing a subdomain to a subdirectory on another host?

This is a discussion on Pointing a subdomain to a subdirectory on another host? in the Computers, Games, Electronics etc forum
Ok, so I have my domain hosted at Godaddy with a crappy $5/month plan. It's not bad for small usage... 'unlimited' bandwidth, 10GB space. I use it for file storage (minecraft server backup archives) and the free phpbb forum. I also have a minecraft server ...

Like Tree1Likes
  • 1 Post By reikoshea

Reply
 
LinkBack Thread Tools
Old 11-14-2011, 07:32 PM   #1
 
DarkHand's Avatar
Posts: 4,709
Default Pointing a subdomain to a subdirectory on another host?

Ok, so I have my domain hosted at Godaddy with a crappy $5/month plan. It's not bad for small usage... 'unlimited' bandwidth, 10GB space. I use it for file storage (minecraft server backup archives) and the free phpbb forum.

I also have a minecraft server hosted with Bitcable, 8-core 3.2ghz KVM, 4gb ram, 200GB raid, 2.4TB transfer/month on a gigabit link. Right now I have an A-record on the godaddy domain pointing to it (mc.domain.com) so I have a nice clean subdomain for folks to type in.

I'm also running Dynmap, which provides realtime mapping of the minecraft server. That's in a subdirectory on the bitcable boxes webserver.

I'd like to create another subdomain and have it point to the mapping directory on the bitcable box (map.domain.com). How can I get a subdomain to point to a subdirectory on a remote box?

Yes I should probably ditch the $5 plan and put it all on the bitcable box, but meh.

EDIT: Typing this all out helped me think through it a bit... I'm guessing I need some sort of .htaccess tomfoolery to redirect connections that have the Map subdomain as a referrer, but maybe there's a better way?
__________________
Quote:
Originally Posted by Celerity
They say you only use 2% of your brain. I wonder what we do with the other 94%.
Quote:
Originally Posted by Drake View Post
Our generation is, by and large, a short bus full of helmet wearing window lickers.
Quote:
Originally Posted by Fernando Aguirre View Post
It’s a competitive world out there, and no one sympathizes with what you are going through, they just want you to perform as expected, and the standard is always high.

Last edited by DarkHand; 11-14-2011 at 07:40 PM.
DarkHand is offline   Reply With Quote
Old 11-15-2011, 12:02 AM   #2
B
 
B's Avatar
Posts: 16,235
Default

Why not just create a CNAME record for the 2nd subdomain?

that's basically what i'm doing here for the CDN. all the js.hondaswap.biz urls are actually loading myaccount.myprofile.mycdnprovider.com/
B is offline   Reply With Quote
Old 11-15-2011, 04:43 AM   #3
B16
 
B16's Avatar
Posts: 10,584
Default

Agreed, use a CNAME.

and what do you mean point to a sub directory? like have newname.domain.com -> whatever.host.net/subdirectory?
B16 is offline   Reply With Quote
Old 11-15-2011, 09:42 AM   #4
 
reikoshea's Avatar
Posts: 12,111
Default

The subdomain part can be kind of confusing, but if you add this to your htaccess file for your primary domain on the box you're pointing the other site to. it'll do what you want. It wont work until after you've added the CNAME for your other site.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^(.*)$ /DIRECTORY/$1
B16 likes this.
reikoshea is offline   Reply With Quote
Old 11-15-2011, 12:55 PM   #5
B
 
B's Avatar
Posts: 16,235
Default

RewriteCond %{HTTP_HOST} ^www.domain.com$
should be
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$

to escape and allow for non-www as well
B is offline   Reply With Quote
Old 11-15-2011, 01:45 PM   #6
 
reikoshea's Avatar
Posts: 12,111
Default

well it's likely not going to be a www, i wrote that in 10 seconds to fill the requirements he gave. Im supposed to be at work at 10am central...i posted that at 9:42.

Feel the love darkhand.
reikoshea is offline   Reply With Quote
Reply

Thread Tools

Hello Guest, why not Register an account with us now to access all of our features and be able to interact with the community?

Already have an account? Login now!


Similar Threads
Thread Thread Starter Forum Replies Last Post
i need a host racintweek Members' Lounge 9 01-16-2005 02:16 PM
who can host a vid? cxjon Auto Multi-Media 3 07-29-2004 10:18 PM
need video host xj0hnx Auto Multi-Media 14 07-10-2004 07:39 AM
Know of a good web host? djyox Members' Lounge 6 01-21-2004 04:17 PM
somebody host my vids! Silverchild79 Members' Lounge 9 08-09-2003 10:01 AM


All times are GMT -5. The time now is 07:05 AM.


Powered by vBulletin® Version 3.8.x
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO
© 2001-2013 HondaSwap.com