Thread: Testing server
View Single Post
  #6 (permalink)  
Old January 28th, 2010, 08:14 PM
Old Pedant Old Pedant is offline
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

You can't really.

On your production site with westnet, if you were to use a URL staring with a slash, as in
Code:
<img src="/images/pix.jpg" />
That would mean "starting at the root of your site, look for the directory images."
So the effective URL would beWhereas if you use that same URL on your testing machine, the effective URL becomeswhereas of course what you *really* wanted wasIt's one of the major problems with developing on an XP/Vista box instead of on a real Windows Server box; you can't properly emulate a live site.

Oh, you *can* do it, by using just the bare bonesas the location for all your files. Meaning that you put your actual files into the c:\inetpub\wwwroot directory, directly, and not into a sub-directory.

That's the bad news.

The good news is that if you consistently use *relative* paths (e.g., "../images/pix.jpg") then they work both places.

In short, if it works on you test machine, it will more than likely work on the production box.

But not necessarily. Once in a while you will get "bitten". But that is why you test not only on your home box but also test test test test on the production box.

Does that help at all?
Reply With Quote
The Following User Says Thank You to Old Pedant For This Useful Post: