469,616 Members | 2,576 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,616 developers. It's quick & easy.

File path problems moving site to new host

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


Jul 22 '05 #1
6 1790
"Tim" <zzz@@zzz.zzz.com> wrote in message
news:3Z********************@comcast.com...
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...-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?

Jul 22 '05 #2
Tim

"McKirahan" <Ne**@McKirahan.com> wrote in message
news:JZ********************@comcast.com...
"Tim" <zzz@@zzz.zzz.com> wrote in message
news:3Z********************@comcast.com...
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...-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?


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.


Jul 22 '05 #3
"Tim" <zz*@zzz.zzz.com> wrote in message
news:4u********************@comcast.com...

"McKirahan" <Ne**@McKirahan.com> wrote in message
news:JZ********************@comcast.com...
"Tim" <zzz@@zzz.zzz.com> wrote in message
news:3Z********************@comcast.com...
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...-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?


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?
Jul 22 '05 #4
On Sun, 13 Feb 2005 22:42:55 -0600, "Tim" <zz*@zzz.zzz.com> wrote:
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.


If all the virtual includes start with a / then it should be simple.

Just do a global find and replace on every file. (On a backup of
course!)

Replace: <!--#include virtual="/
With: <!--#include virtual="/new-root-folder/
I use a handy little text editor called Editpad[1] for things like
that as it can quite promptly open hundres of files at once and do a
find and replace on the whole lot.

I

[1] www.editpadpro.com

--
Iain Norman | http://www.eliteforum.org
Jul 22 '05 #5
I'd be looking for a different host. This new one is not giving you a normal
web site.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Tim" <zzz@@zzz.zzz.com> wrote in message
news:3Z********************@comcast.com...
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...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


Jul 22 '05 #6
"Tim" wrote in message news:4u********************@comcast.com...
:
: 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
Jul 22 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Peter Blum | last post: by
6 posts views Thread by Mikey_Doc | last post: by
5 posts views Thread by Daniel Corbett | last post: by
1 post views Thread by Duffman | last post: by
3 posts views Thread by David Thielen | last post: by
1 post views Thread by Phillip N Rounds | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.