gazette
|
|
Issue # 206 (10-12-2003)
Moving Day
On The Move...
You move your domain sometimes out of necessity, sometimes for financial reasons, and for a host of other reasons. Regardless of what you've been told, or what you've experienced ... it doesn't have to be a nightmare.
|
|
Coders Corner
|
While in the process of moving your domain, one of the steps you're going to be taking is in changing your domain's IP Number, through DNS. DNS Changes are not instant, and they are not globally done. What that means is that it might take 24 hours for your change to be seen at all by the Internet, and up to 72 hours before all of the DNS servers update themselves. In english ... it could take 3 days for your domain to be "up" in it's new location, and during that 3 days, some people will be "hitting" your new server, others will still be seeing your old one.
If you are a database driven site (such as our forums), this can be devastating. Paramount is making sure that all of your visitors are seeing the same machine all the time, so that your database remains in sync. If you're running apache (you should be...) Here's a way to make sure that happens:
- Turn OFF your old domain. Make sure that every single page, CGI application, PHP, etc. are all off, redirected to a "Sorry, we're down for maintainance" page of some kind. Don't worry, that page won't be up long.
- Unload/Dump your Database
- Move it to the new server, and load it there.
- On your old server, use apache's "mod_rewrite" to force all traffic from your old server to your new IP number. The following lines can be added to a file called ".htaccess" that you can place in your root/main web directory:
LoadModule rewrite_module libexec/mod_rewrite.so
AddModule mod_rewrite.c
RewriteEngine on
RewriteRule ^(/)(.*) http://XXX.XXX.XXX.XXX/$2
Change "XXX.XXX.XXX.XXX" to the IP Number of your new server.
Talk about this idea, or offer suggestions for users on other web server platforms in the Programming Forums
|
Read the Coders Corner section from the
Last Issue or in the
Following Issue
JimWorld Member comments and feedback ...
Add your own comment ....
|
Sponsored Links
 |
|
Member Spotlight
BuySellLinks.com
Revenue for your site ? Sell text links directly to other WebMasters. (bsl)
|
|
|
|