Renidrag Posted May 28, 2012 Share Posted May 28, 2012 I have a site that i split up, the website is now hosted on a hosting service but we kept the email server in place inhouse, i setup the dns records to send all web related to the hosting and mail to the inhouse problem i ran into is a lot of employees use the www.sitename.com:81/exchange/ to get / manage their emails but since i have set advance settings in the DNS the name does not work, the IP does but I would like to see if there is a way to catch the request and then send the user to 142.XX.XX.XXX:81/exchange/ the IP does work fine or any other php or code to catch this and redirect or settings in a cpanel hosting package thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/263242-redirecting-port-81-in-htaccess/ Share on other sites More sharing options...
requinix Posted May 28, 2012 Share Posted May 28, 2012 The place to "catch the request" is DNS. Without it they can't even reach the server, let alone find out they have to be redirected somewhere. Quote Link to comment https://forums.phpfreaks.com/topic/263242-redirecting-port-81-in-htaccess/#findComment-1349096 Share on other sites More sharing options...
Renidrag Posted May 31, 2012 Author Share Posted May 31, 2012 hey requinix, thanks for the reply, I have setup the www, @(none), *(all others) to point to the new hosting provider and then I setup the mail.sitename.com MX and A-Record to send the email related to the inhouse server where it always resided Everything is working fine, only change was when all was hosted inhouse email users connected to the MS Exchange server online at http://www.sitename.com:81/exchange/ and now they have to go to http://XXX.XXX.XXX.XXX:81/exchange the ip of the inhouse so that is ok if I cant find a work around, not sure if I can use CNAME alias in the DNS Manager and put in the url www.sitename.com:81/echange and point it to the ip of the inhouse Another bigger problem thou is the OWNER uses a blackberry Storm and can not connect to his email, all workers with blackberries can not connect to the email but IPHONE users can connect fine I dont have a blackberry to test this issue, IMAP on the inhouse server is setup and running so not sure what to do there any thoughts would be great Quote Link to comment https://forums.phpfreaks.com/topic/263242-redirecting-port-81-in-htaccess/#findComment-1350127 Share on other sites More sharing options...
requinix Posted May 31, 2012 Share Posted May 31, 2012 You can't put port numbers or paths into DNS. Only hostnames and IP addresses. You have three options: a) Have people change the configured location of the Exchange server in their clients b) Make www.sitename.com resolve to the XXX address, or move Exchange to that machine c) Have the www.sitename.com server proxy requests for www.sitename.com:81/exchange/ to the new location. This is a bad choice Quote Link to comment https://forums.phpfreaks.com/topic/263242-redirecting-port-81-in-htaccess/#findComment-1350137 Share on other sites More sharing options...
Renidrag Posted June 5, 2012 Author Share Posted June 5, 2012 So, here is an update, and one small problem I am still having first brief details: -new revised website is now on hosting company's server -old website still sits on inhouse server -email is MS Exchange Server and is inhouse as always advance settings applied to DNS provider are all working fine -www points to new IP on host company -@(none) points to new IP on host company -*(all) points to new IP on host company -mail.sitename.com ponts to IP of inhouse (where email always was) ** Problem with blackberry phones not connecting and recieving emails was solved by deleteing the email account off the phone and setting it up with email and password again and all worked fine ************ Problem now is, all employee's in the office (inhouse) put in www.sitename.com and still go to the old site - cache has been cleared, history cleared, DNS flushed but I think it is pulling locally, I dropped by and took a quick look and Primary DNS Suffix is ABC.local (ABC being the site name first initals) strange thing is they get the new site sometimes, in the morning, briefly if at all and the rest of the day it seems to pull locally any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/263242-redirecting-port-81-in-htaccess/#findComment-1351516 Share on other sites More sharing options...
requinix Posted June 5, 2012 Share Posted June 5, 2012 First step is finding out who is saying where the site is. On an affected machine, 1. Who are the DNS servers? 2. If you do an nslookup -type=all www.sitename.com, what results do you get? 3. If you clear the cache (and verify that it's been cleared) and ping www.sitename.com, what IP address does it use? Quote Link to comment https://forums.phpfreaks.com/topic/263242-redirecting-port-81-in-htaccess/#findComment-1351520 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.