Forum Moderators: phranque
what we're trying to set up is subdomains for site.com, such as uk.site.com nl.site.com or ro.site.com that would point to their respective community sites.
I'm looking for 2 ways to do this.
1 - for those who want to redirect the domain to something like site-germany.com
2 - a solution for those that do not have a domain name for their community sites but want to create one.
a way to redirect the user to a different IP address when he typed in ro.site.com - but keep the domain name and not refresh to ip.ip.ip.ip/index.php
seen this done on nukecops.com, but have no clue whatsoever.
could you point me in the right direction? what is this called and what should I be searching for?
thank you.
I'm not totally clear on your questions, but here goes...
You can allow arbitrary subdomain names in your domain by setting up "wild-card DNS". This is typically managed through your DNS "Zone file." All subdomains will then be pointed to your server's IP address.
Once the request is received by your server, it can direct the subdomain requests to separate virtual servers, or to subdirectories of your main domain's account. This is configurable in httpd.conf and/or .htaccess.
For those subdomains that are actually hosted outside your server, you will need to configure Apache mod_proxy. Requests for resources in those subdomains will be proxied through your server, and the content will appear to come from your server.
I'm not sure if you are hinting at wanting to do this automatically -- that is, without any work when you add a new subdomain. I think that would be fairly difficult, but I've never done it.
Jim
for the second option, when content is hosted on another server, but appears to be from community.somesite.com, could anyone pass me a link to read more about it?
is mod_proxy the only way?
thanks.