Changing hosts.

liunx

Guest
I am in the process of changing hosts. I have Download <!--more-->ed the entire site from my old host and uploaded the files to the new host but I have not yet changed the DNS servers so I have to login and view my new site via 123.456.789.012 rather than <!-- m --><a class="postlink" href="http://www.editfast.com">http://www.editfast.com</a><!-- m --><br />
<br />
There are several changes that need to be made for the new site to work especially in the .cgi scripts. My question is can I change all references in my html pages and in the cgi scripts to "editfast.com" to point to "123.456.789.012"? Will this work even after I change the DNS servers? Or will I have to change them back again?<br />
<br />
Actually any help with moving a site to a new host would be appreciated since this is just one of my questions.<br />
<br />
Thanks for your help.<!--content-->You can use either, but if your hosts move everything to a new server with a new DNS number at some point, perhaps for maintenance of the main server, or just because they run out of room, then it will stop working. By using the domain name (which I assume you own), then the site will work wherever it is placed, once the DNS records have been updated to reflect the correct location.<br />
<br />
<br />
<br />
While you have this lot on your hard drive, it is easy to fix up the code errors. Should take about 20 minutes or so.<br />
<br />
For now, you can ignore all errors like Error: there is no attribute "foo" for this element (in this HTML version).<br />
<br />
Add type="text/javascript" to all script tags.<br />
<br />
Make sure the javascript code itself is enclosed in starting <!-- and ending --> comment tags.<br />
<br />
Add alt="some text" to all img tags. Use alt="" on images that are spacers, or unimportant, and alt="*" on bullet point images.<br />
<br />
Escape the ampersands: change & to &amp; in all URLs.<br />
<br />
Quote all attributes: HREF=http://www.htmlforums.com/archive/index.php/mailto:[email protected] should be HREF="mailto:[email protected]" otherwise it will not work in some browsers.<br />
<br />
<br />
Review the link to see that you got 'em all: <!-- m --><a class="postlink" href="http://validator.w3.org/check?uri=http%3A%2F%2Fwww.editfast.com%2F&charset=%28detect+automatically%29&doctype=HTML+4.01+Transitional&ss=">http://validator.w3.org/check?uri=http% ... tional&ss=</a><!-- m --><!--content-->giz: do you have that written down somewhere??? :P<br />
<br />
I see you post the samething all the time. I do have one problem with it.<br />
<br />
Escape the ampersands: change & to &amp; in all URLs.<br />
<br />
<br />
you don't need to do that.<!--content-->In general, leaving it as & doesn't cause a lot of problems, but the usage of the & is defined as a prefix to character entities.<br />
<br />
A problem with having such links with an & in them (e.g. in HREF attribute values) in HTML documents is that the '&' should really be SGML-escaped (written as '&amp;') to do it properly.<br />
<br />
Conflicts can arise if the field name in a search string coincides with the name of an HTML character entity.<br />
<br />
<br />
<br />
From: <!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-html40/appendix/notes.html">http://www.w3.org/TR/REC-html40/appendix/notes.html</a><!-- m --><br />
<br />
>> B.2.2 Ampersands in URI attribute values <<<br />
<br />
>> The URI that is constructed when a form is submitted may be used as an anchor-style link (e.g., the href attribute for the A element). Unfortunately, the use of the "&" character to separate form fields interacts with its use in SGML attribute values to delimit character entity references. For example, to use the URI "http://hostname/?x=1&y=2" as a linking URI, it must be written <A href=http://www.htmlforums.com/archive/index.php/"http://hostname/?x=1&#38;y=2"> or <A href="http://hostname/?x=1&amp;y=2">. <<<br />
<br />
<br />
<br />
This is also relevant:<br />
<br />
<!-- m --><a class="postlink" href="http://lists.w3.org/Archives/Public/www-validator/1999Jun/0013.html">http://lists.w3.org/Archives/Public/www ... /0013.html</a><!-- m --><br />
<br />
Be aware that typing, or pasting, into the browser a URL with &amp; in it will not work. If you type a URL in, it must have only the & in it. If the URL is clicked upon within a webpage then it can be either & or &amp; but you should always avoid & because that is the prefix for an entity.<!--content-->
 
Back
Top