File path problems moving site to new host

T

Tim

I am in the process of moving a site from one hosting company to another.
This site is fairly large, with hundreds of asp files, each with multiple
"include" statements.

The new host has a different webspace folder structure for it's clients than
the old host. At the moment, this is forcing me to have to append all the
paths for all the include statements (not to mention all the other
path-related code) to make things work.

Example:

Old host url to homepage:
http://www.oursite.com/index.asp
New host url to homepage
http://www.oursite.com/our-site-root-folder-as-enforced-by-new-host/index.asp

I've never had to move a site this complex, so my question is - what is the
best way or "best practices" method to move this site successfully without
having to change hundereds of lines of code?

I did not write the original site code, and there is no global variable
available to address this.

Thank you very much for any assistance!
Tim
 
M

McKirahan

Tim said:
I am in the process of moving a site from one hosting company to another.
This site is fairly large, with hundreds of asp files, each with multiple
"include" statements.

The new host has a different webspace folder structure for it's clients than
the old host. At the moment, this is forcing me to have to append all the
paths for all the include statements (not to mention all the other
path-related code) to make things work.

Example:

Old host url to homepage:
http://www.oursite.com/index.asp
New host url to homepage
http://www.oursite.com/our-site-root-folder-as-enforced-by-new-host/index.as
p

I've never had to move a site this complex, so my question is - what is the
best way or "best practices" method to move this site successfully without
having to change hundereds of lines of code?

I did not write the original site code, and there is no global variable
available to address this.

Thank you very much for any assistance!
Tim

What is an example of an "include" that is used?

Does it not use a relative path?

Basically, can't you just change them to use relative paths?
 
T

Tim

McKirahan said:
What is an example of an "include" that is used?

Does it not use a relative path?

Basically, can't you just change them to use relative paths?



They are all using virtual paths, such as <!--#include
virtual="/includes/mainMenu_script.asp" -->

Right now, the only way I can get the asp files to work is if I append our
new root folder to the includes, like this:

<!--#include
virtual="/folder-assigned-by-new-webhost/includes/mainMenu_script.asp" -->

This would mean changing hundreds of lines of code burried within hundreds
of asp files, and I'm sure that is not the solution. I'm sure I'm missing
something, but I'm just not sure what.

Thanks.
 
M

McKirahan

Tim said:
They are all using virtual paths, such as <!--#include
virtual="/includes/mainMenu_script.asp" -->

Right now, the only way I can get the asp files to work is if I append our
new root folder to the includes, like this:

<!--#include
virtual="/folder-assigned-by-new-webhost/includes/mainMenu_script.asp" -->

This would mean changing hundreds of lines of code burried within hundreds
of asp files, and I'm sure that is not the solution. I'm sure I'm missing
something, but I'm just not sure what.

Thanks.

Can't you create a virtual folder as was done before?

If not, why don't you create a folder off of the webroot called "includes"
and change "virtual=" to "file="; this would allow for future migrations as
well.


Are the include files all in the same folder?

Also, are all of the ASP files in the same folder?
 
M

Mark Schupp

I'd be looking for a different host. This new one is not giving you a normal
web site.
 
R

Roland Hall

in message :
: They are all using virtual paths, such as <!--#include
: virtual="/includes/mainMenu_script.asp" -->
:
: Right now, the only way I can get the asp files to work is if I append our
: new root folder to the includes, like this:
:
: <!--#include
: virtual="/folder-assigned-by-new-webhost/includes/mainMenu_script.asp" -->
:
: This would mean changing hundreds of lines of code burried within hundreds
: of asp files, and I'm sure that is not the solution. I'm sure I'm missing
: something, but I'm just not sure what.

I'm sorry but this doesn't make any sense. With include virtual, / is the
virtual web root. If your include paths are all:
/includes/somefile.asp then that reads as
http://domain.com/includes/somefile.asp.

If your physical path is similar to:
d:\websites\domain.com\webroot\includes

....then what is the problem?

--
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top