P.Z. Low Cost CPanel Web Hosting  

Go Back   P.Z. Low Cost CPanel Web Hosting > Page-Zone Web Hosting Main Forum > General FAQ > General Questions and Comments

General Questions and Comments Post your question or grace us with your knowledge. Posting limited to registered members.

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
See website on server before changing DNS
Old
  (#1 (permalink))
Jim
of Page-Zone
Jim will become famous soon enoughJim will become famous soon enough
 
Status: Offline
Posts: 1,134
Join Date: Jun 2002
Location: Wauseon, Ohio
Rep Power: 98
My location
See website on server before changing DNS - 05-22-2007, 06:33 PM

Attempting to view your website using the temporary URL 'hostname/~user will not work well if at all with php scripts.

In order to see a site on our server while the rest of the world is seeing it on another server the hosts file on your computer needs edited.

The hosts file, a plain text file located on your computer, is an override of sorts to checking dns externally. It is also called hosts or host with no extension in virtually all operating systems, although the location of the file will vary by OS and even version of OS. More on hosts files here.

In Windows XP it is located inside c:/system32/drivers/etc/ but a search for the filename will give its location.

Open in a text editor and add your server's IP, which is in the welcome email, and your domain name. For example:

8.9.24.24 example.com
8.9.24.24 www.example.com
8.9.24.24 subdomain.example.com

Editting alternative:
Don't want to go rooting around for the file? This will edit the file.

1.) Open start | run & type cmd in the run box.

A black window should open.

2.) First back up the file for safety by copy and pasting this command including the word "copy".
This backs up your hosts file.

copy %windir%\system32\drivers\etc\hosts hosts.bak

3.) Then replace the example IP addess with the IP and domain name of your server and paste these commands:

echo 67.76.156.111 example.com >>%windir%\system32\drivers\etc\hosts

echo 67.76.156.111 www.example.com >>%windir%\system32\drivers\etc\hosts


--

To remove it manually edit the hosts file, or open a command prompt again using step 1.

Then paste this:

copy hosts.bak %windir%\system32\drivers\etc\hosts

Answer yes at the yes/no prompt.

This will make it so your computer goes to the new server, but all other computers on the Internet see it at the old server.

It is a good idea to remove that spec once the site is resolving correctly.
-
Note - for Windows Vista users, the file will need edited using the command prompt running as the administrator.
Attached Thumbnails
see-website-server-before-changing-dns-vistacommand.png  

see-website-server-before-changing-dns-dns2.png  



--
Thank You,
Jim Snape
Page-Zone
--
   
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Domain's Nameserver vs Changing Registrar jimeoff General Questions and Comments 1 11-05-2007 12:27 AM
Value in re-creating a website? Gregg General Questions and Comments 1 07-15-2006 12:59 AM
Changing DNS to point to our server Jim General Questions and Comments 0 11-11-2004 10:55 PM
Your website and new XP SP2 stratplan General Chat 8 06-21-2004 08:32 PM
Fantastico and PHP Website mikez68 General Questions and Comments 6 02-26-2003 03:02 PM


Live Help



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC6
vBulletin Skin developed by: vBStyles.com
Copyright © 2002 Page-Zone Web Hosting. All rights reserved.
Smilies provided by Crack's Smilies http://www.mysmilies.com