Having DNS-based redirection problems

A client is consolidating domains. They want anyone visiting any page at the old domain to go to a specific page at their new domain.

So, visits to any page at www.olddomain.com

Should all go to:

I tried setting up a permanent redirect for the whole domain through the control panel. It works as long as a visitor doesn’t provide a file name. Otherwise, it tacks the name of the file at the old domain to the new URL. So, we get a URL like:

Is there a way to do this through a DNS redirect? If not, I’ll use an htaccess or PHP and a custom 404 handler to do the redirecting.

Thanks,
Tim

A DNS redirect can’t handle the filenames as well.

Thanks Stephen. I used PHP and it’s working fine now. I just had to wait for the DNS changes to propagate and then clear my local cache.

Tim