[Pdns-users] redirect a search for one site to another site

2010-12-25 Thread Morgan Osborne
PowerDNS version you are using?
Power DNS Authoritative Server Version 2.9.22


Operating system it is running on?
 Linux(Ubuntu)


Where you got the binary from, ie did you compile it yourself (which compiler, 
including version), from your distribution or ports tree etc?
 Unbuntu auto download

What is going wrong?
I want to redirect a search for one site to another site and I'm unable to 
redirect a search for one site to another. More specific, and for example 
puposes I have two records.
The first is 'red.com' with a record type of 'CNAME' and content of 'blue.com' 
, then the second record is 'blue.com' with a record type of 'A' and the 
correct IP address of '150.145.15.1'
So now when I do a http search for 'red.com' I get to the error site of 
'150.145.15.1' and not all the way to the site of 'blue.com'

Then, now to confirm the second record is working properly, I am able to go 
directly by doing a http search for 'blue.com' and I do get all the way to 
'blue.com' site. So I know thats working.

Given all of this, I suspect the problem is one of the following:

1. I am not inserting the records correctly, or using the wrong record types

 2. The CNAME does not send back to the http search the 'blue.com' name so when 
it gets to site '150.145.15.1' it does not know what to look for (and is 
probably looking for 'red.com' instead of 'blue.com' and thats why I get the 
error page)

 3. I should not be using CNAME for a redirect, but some other record type

 4. or, the Aliases in the record is interrupting the search somehow on 
'150.145.15.1'


What you did, or somebody else did, that causes things to go wrong?
n/a, Just need to figure it out.


What you expect to happen (many problems are in fact wrong expectations, and 
not bugs)?
Correct. I presume nothing is wrong at this point, except not know the correct 
record procedures.

*ANYTHING* else that might be relevant, like load balancers, strange hardware, 
firewall rules etc etc?
 No, nothing else.


 Thank you! I look forward to the feedback!
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] redirect a search for one site to another site

2010-12-25 Thread bert hubert
On Sat, Dec 25, 2010 at 05:13:47PM -0500, Morgan Osborne wrote:

 The first is 'red.com' with a record type of 'CNAME' and content of
 'blue.com' , then the second record is 'blue.com' with a record type of
 'A' and the correct IP address of '150.145.15.1' So now when I do a http
 search for 'red.com' I get to the error site of '150.145.15.1' and not all
 the way to the site of 'blue.com'

Morgan,

This is indeed how DNS works. A CNAME works 'behind the scenes'. What you
are looking for is a HTTP-level redirect such as a 301 or 302 directive.
This will instruct the browser to go 'all the way' to blue.com.

For Apache, this is documented on
http://httpd.apache.org/docs/current/mod/mod_alias.html

 1. I am not inserting the records correctly, or using the wrong record types
 
  2. The CNAME does not send back to the http search the 'blue.com' name so
 when it gets to site '150.145.15.1' it does not know what to look for (and
 is probably looking for 'red.com' instead of 'blue.com' and thats why I
 get the error page)
 
  3. I should not be using CNAME for a redirect, but some other record type
 
  4. or, the Aliases in the record is interrupting the search somehow on 
 '150.145.15.1'

'2' is the one you are looking for.

Good luck!
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users