Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Jason Carlton
August 18, 2008, 9:35 pm
rate this thread
I'm moving my site from one server to another, which means a different
IP address. My local cable provider takes about 3 weeks to update
their DNS records, though, so I can't just copy it over and update the
nameservers; I need to do something for the people that are still
pinging the old server to get them to the new one.
My best thought is to use the .htaccess file on the old server to
redirect them to the new server via IP address, like this:
RewriteCond % ^www.mydomain.com$ [NC]
RewriteRule ^(.*)$ http://126.96.36.199/~mydomain /$1 [R=302,L]
I'm using R=302 because I don't want search engines to record the IP
address, obviously; I want them to retain the domain name, and to them
it SHOULD be updated pretty quickly.
My questions are:
1. Is this really the best way to handle this?
2. If so, do you see any problems with my code above?
3. Is there a way to make the redirect invisible, so that the person
pinging the old server wouldn't see the http://188.8.131.52/~mydomain
when they're redirected?
- » Create an Agree to Terms pop-up or interstitial on click of button or link
- — Previous thread in » Webmaster Forum
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — The site's Newest Thread. Posted in » Secure Shell Forum