Page 2 of 2

Re: Sending Data to 2 web servers

Posted: Wed 01 Feb 2012 7:09 am
by gemini06720
Mick, another question: Why do you need to host your domains on two different hosts?

Re: Sending Data to 2 web servers

Posted: Wed 01 Feb 2012 8:32 am
by serowe
Ray - depending on what is primarily being hosted some hosts provide better services for different types of data. For example - we use 3 different hosts - one for photography/images (they have a better deal for space/bandwidth/speed but don't require many multiple connections), another for sporting information/results/news (doesn't need speed but can handle high volume connections) and another for family history site(s) (better than the other two for large - read huge - MySQL database access).

Horses for courses.

Re: Sending Data to 2 web servers

Posted: Wed 01 Feb 2012 8:48 am
by mcrossley
mickopla wrote:
mcrossley wrote:I may be missing something, but couldn't you just alter your DNS entries so that both domain names point to the same server?
Just like TNET weather said would this be possible if dealing with two separate hosts??? If so how would i do this?

Mick
Hi Mick, I just wondered why if the sites are identical apart from the domain name you need them on separate hosts in the first place? Just have one host with the two domain names pointing to the same server. But like I said I may be missing some vital detail.

Re: Sending Data to 2 web servers

Posted: Wed 01 Feb 2012 1:08 pm
by mickopla
mcrossley wrote:
mickopla wrote:
mcrossley wrote:I may be missing something, but couldn't you just alter your DNS entries so that both domain names point to the same server?
Just like TNET weather said would this be possible if dealing with two separate hosts??? If so how would i do this?

Mick
Hi Mick, I just wondered why if the sites are identical apart from the domain name you need them on separate hosts in the first place? Just have one host with the two domain names pointing to the same server. But like I said I may be missing some vital detail.
Rightly or wrongly i thought that if i wanted to add a domain to my original host i would have to pay them extra. This made me look for a free hosting service hence using 2 different servers. Maybe my original host would allow me to add a domain for free. I honestly don't know and would have to check with them. If i did transfer the domain to my original host how would i alter the DNS entries so that both domain names point to the same server?

Re: Sending Data to 2 web servers

Posted: Wed 01 Feb 2012 1:50 pm
by mcrossley
Who 'hosts' the domain name is independent of where the DNS entry for that domain points (in all the cases I have come across anyway). None of my web sites are 'hosted' by the company that maintains my domain names - they just give me a control panel where I can configure the DNS entries as I wish).

Another method to combine the sites (if you have access to configure it) is to configure the web server to send a '301' server side redirect to the client. This is the most efficient mechanism for redirecting (the client does not download any HTML), and you can redirect all the pages on a site with a single configuration entry.

Re: Sending Data to 2 web servers

Posted: Wed 01 Feb 2012 2:00 pm
by mickopla
mcrossley wrote:Who 'hosts' the domain name is independent of where the DNS entry for that domain points (in all the cases I have come across anyway). None of my web sites are 'hosted' by the company that maintains my domain names - they just give me a control panel where I can configure the DNS entries as I wish).

Another method to combine the sites (if you have access to configure it) is to configure the web server to send a '301' server side redirect to the client. This is the most efficient mechanism for redirecting (the client does not download any HTML), and you can redirect all the pages on a site with a single configuration entry.
My knowledge on servers and commands is not great but i guess its a good way to learn.

Edit: Trying to get my head around this. What would the procedure be if i want the http://www.waterfordcityweather.com/index.php to show up as http://www.waterfordweather.com and have all the content on the page? Basically what i want is for people who click on waterfordweather.com to get the content from http://www.waterfordcityweather.com/index.php

Edit 2: Ok i figure i need to create a htaccess file with the command included. What command would i use to redirect www.waterfordcityweather.com/index.php to www.waterfordweather.com ? You guys know your stuff so hopefully you can help.

Re: Sending Data to 2 web servers

Posted: Wed 01 Feb 2012 8:25 pm
by serowe
[quote="mickoplaRightly or wrongly i thought that if i wanted to add a domain to my original host i would have to pay them extra. This made me look for a free hosting service hence using 2 different servers. Maybe my original host would allow me to add a domain for free. I honestly don't know and would have to check with them. If i did transfer the domain to my original host how would i alter the DNS entries so that both domain names point to the same server?[/quote]
Some hosts will allow you to host 1 or more domans under a package - the more you pay, usually, the more you pay. Some hosts will also allow you to 'park' a fomain as well - again, 1 or more may be allowed. What this does is allow you to own a domain (example.com say) and, if anyone goes to that page, a static page is displayed (this may be pre-configureed by your host or they allow you to do so) but it won't allow you to place multiple pages on that site.

Generally the free hosting companies allow one domain name and nothing more.

Host companies have no control (well as long as you have read their T&C's) over where the DNS entry points - that is done with whoever you are paying for the registration of your domain name. So, with the previous example I gave of some of my sites, they are all registered with one registration company and I set the name servers to point to whichever host company is hosting each web site (if this makes sense).

Be very careful, though, if you do have two domain names that share a commo set of pages. You could very easily get lost with links on your pages going to the wrong site if you aren't careful.

Re: Sending Data to 2 web servers

Posted: Thu 02 Feb 2012 5:24 am
by mickopla
Would this code work for me??

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !waterfordcityweather.com/index.php$ [NC]
RewriteRule ^(.*)$ http://www.waterfordweather.com/$1 [L,R=301]