Forum Moderators: phranque

Message Too Old, No Replies

Redirect one directory to new IP address

Redirect to new IP address

         

xogrl1234

1:23 pm on Jul 29, 2009 (gmt 0)

10+ Year Member



Here is my situation.
I have Apache and MySQL on two machines. Currently the ip address being used for all companies is:
[machine1.com...]

I am trying to reroute one company to the second machine because their MySQL database has been moved there. I have edited the .htaccess file in that company's subdirectory. It contains the following:
Redirect 301 /companyname [newipaddress...]

When I attempt to access this company after these changes have been made, I am prompted with the login screen. I login successfully and see the new ip address flash in the status bar. However, I then receive the dreaded 'Page cannot be displayed.'

Any help would be greatly appreciated!
Thanks,
Marisa

jdMorgan

2:20 pm on Jul 29, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I assume this is a temporary fix, as you probably don't want that IP address appearing in URLs.

Do you plan to give that company it's own domain name?
If not, a reverse-proxy from machine1.com/companyname to [machine2-IP-address...] would seem to be the proper solution.
And note that secondary aspect: Is "company" now at machine2-IP/companyname/, or at machine2-IP/ ?

Before changing anything, I'd suggest you install and test with the "Live HTTP Headers" add-on for Mozilla and Firefox browsers, and get a close look at the transactions between your browser and the servers. That will likely provide much more insight than the "dumbed-down" browser error messages.

This could be something as simple as the server configuration on machine2 not set up to recognize the IP as a hostname, or perhaps a domain canonicalization redirect that won't accept the IP address as a hostname and tries to redirect it back to machine1.

Jim