"jt" wrote:
: our web application is currently using relative paths in
: various places throughout our code. im working on
: eliminating this, but not sure of the best way to go about
: it. i want to avoid hardcoding the path to make migration
: easier and more manageable. i thought there is a way to
: user the request object?? request.servervariables or
: something - any help would be greatly appreciated..
Why not just start at the root for all links?
/default.asp
/asp/somefile.asp
/js/somefile.js
/images/somefile.jpg
You move this site to another server, a different domain and it all still
works as it does on this site. There is no change unless you modify your
structure.
You can also create a header file that assigns file paths as variables and
create them as constants. Link that in with every page, along with other
header processing routines, so if you decided to change /images to
/pictures, you make one change in the header.
HTH...
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library -
http://msdn.microsoft.com/library/default.asp