HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   Redirecting subdomains to external websites (http://www.howtoforge.com/forums/showthread.php?t=48121)

wikidd 20th August 2010 18:39

Redirecting subdomains to external websites
 
Hopefully this is a simple problem. We are attemping to use ISPConfig to combine all our different services into one Control Panel. The last piece is our DNS provider allows us to setup forwards by creating dns entries like:

webmail.domain.tld -> forwards to -> http://owa.somedomain.com

From what I have seen we should be able to mimic the same functionality by creating a subdomain under the websites and redirecting it to an external site. So I setup a subdomain and set the redirection to the site but it just keeps showing the same homepage for the main domain. I have tried the different flags and confirmed the changes are being made in the vhost.

Is there anything else I should look at or try to see why this isn't working?

Thanks

Rapid2214 21st August 2010 10:42

Use DNS

foo.example.com. CNAME bar.example.com.
bar.example.com. A 192.0.2.23

When an A record lookup for foo.example.com is done, the resolver will see a CNAME record and restart the checking at bar.example.com and will then return 192.0.2.23.

http://en.wikipedia.org/wiki/CNAME_record

Good luck,

Marty

sjau 21st August 2010 10:58

or you could do a http redirect from the actual subdomain....

Rapid2214 21st August 2010 11:02

Quote:

Originally Posted by sjau (Post 237085)
or you could do a http redirect from the actual subdomain....


Thats what he is attempting to do but failing... :)

sjau 21st August 2010 11:19

make an index.php and add this to it:

Code:

<?php
/* This will give an error. Note the output
 * above, which is before the header() call */
header('Location: http://www.example.com/');
?>


till 21st August 2010 15:39

Quote:

Originally Posted by wikidd (Post 237047)
Hopefully this is a simple problem. We are attemping to use ISPConfig to combine all our different services into one Control Panel. The last piece is our DNS provider allows us to setup forwards by creating dns entries like:

webmail.domain.tld -> forwards to -> http://owa.somedomain.com

From what I have seen we should be able to mimic the same functionality by creating a subdomain under the websites and redirecting it to an external site. So I setup a subdomain and set the redirection to the site but it just keeps showing the same homepage for the main domain. I have tried the different flags and confirmed the changes are being made in the vhost.

Is there anything else I should look at or try to see why this isn't working?

Thanks

This should work by creating a subdomain.

1) Create a dns a-record for webmail.domain.tld pointing to the same IP address the the website where you want to create the subdomain.
2) Add a subdomain webmail.domain.tld and select as redirect type "No Flag" and enter as redirect path "http://owa.somedomain.com/".


All times are GMT +2. The time now is 16:56.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.