Duplicate web site for testing

B

Bob Murdoch

I have a fairly complicated web site with multiple sub-folders running on
W2k server (IIS5?).

I would like to duplicate this to another web site on the same server for
testing. For instance, the current root web of the server is located at
F:\Web. The production site is F:\Web\MyApp. I want to create another site
at F:\Web\MyAppTest.

The only thing that prevents me from just copying everything from one to the
other is the links and includes of the pages, such as:

<!--#include virtual="/MyApp/Shared/Server/DbLibrary.asp" -->
<link REL="stylesheet" TYPE="text/css"
HREF="/MyApp/Shared/Style/Style.css">

I then need to go thru every source file, and change /MyApp to /MyAppTest.

Is there a way to accomplish this via IIS, or by changing the way I
reference the includes and link?

tia,

Bob M..
 
E

Evertjan.

Bob Murdoch wrote on 18 jun 2004 in
microsoft.public.inetserver.asp.general:
I have a fairly complicated web site with multiple sub-folders running
on W2k server (IIS5?).

I would like to duplicate this to another web site on the same server
for testing. For instance, the current root web of the server is
located at F:\Web. The production site is F:\Web\MyApp. I want to
create another site at F:\Web\MyAppTest.

The only thing that prevents me from just copying everything from one
to the other is the links and includes of the pages, such as:

<!--#include virtual="/MyApp/Shared/Server/DbLibrary.asp" -->
<link REL="stylesheet" TYPE="text/css"
HREF="/MyApp/Shared/Style/Style.css">

I then need to go thru every source file, and change /MyApp to
/MyAppTest.

Is there a way to accomplish this via IIS, or by changing the way I
reference the includes and link?

There are many ways to change /MyApp/ to /MyAppTest/ in multiple files.

Do not try to change /MyApp to /MyAppTest because you could end up
somewhere with /MyAppTestTest/

http://www.google.com/search?q=replace.text.in.multiple.files
[724 hits]

I would use editpad.
 
B

Bob Murdoch

Evertjan. said:
Bob Murdoch wrote on 18 jun 2004 in
microsoft.public.inetserver.asp.general:


There are many ways to change /MyApp/ to /MyAppTest/ in multiple files.

Do not try to change /MyApp to /MyAppTest because you could end up
somewhere with /MyAppTestTest/

<G>
I wasn't looking for a way to change those strings, I was looking for a way
*not* to have to change those strings.

That's it, I'm hiring a tech writer to handle my postings to news groups.
They will hopefully do a much better job than trying to get my point across
<g>.

Bob M..
 
T

Tom Kaminski [MVP]

Bob Murdoch said:
I have a fairly complicated web site with multiple sub-folders running on
W2k server (IIS5?).

I would like to duplicate this to another web site on the same server for
testing. For instance, the current root web of the server is located at
F:\Web. The production site is F:\Web\MyApp. I want to create another site
at F:\Web\MyAppTest.

The only thing that prevents me from just copying everything from one to the
other is the links and includes of the pages, such as:

<!--#include virtual="/MyApp/Shared/Server/DbLibrary.asp" -->
<link REL="stylesheet" TYPE="text/css"
HREF="/MyApp/Shared/Style/Style.css">

I then need to go thru every source file, and change /MyApp to /MyAppTest.

Is there a way to accomplish this via IIS, or by changing the way I
reference the includes and link?

Setup a second virtual server, either using Host Headers or a different
port - then you wouldn't have to change any paths or references. Create
your new server root at F:\TestWeb and copy the files under there to
F:\TestWeb\MyApp.
http://www.microsoft.com/windows2000/en/server/iis/htm/core/iiaddvs.htm

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserver2003/community/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com
 
B

Bob Murdoch

Bob Murdoch said:
I have a fairly complicated web site with multiple sub-folders running on
W2k server (IIS5?).

I would like to duplicate this to another web site on the same server for
testing. For instance, the current root web of the server is located at
F:\Web. The production site is F:\Web\MyApp. I want to create another site
at F:\Web\MyAppTest.

What I wound up doing was to create a new folder F:\WebTest, and copied
everything from F:\Web into it. I then added a new website to IIS,
listening to port 8080. This setup seems to work well, except when the
customer is behind a firewall that only let's port 80 out.

I welcome any other ideas.

Bob M..
 
J

Jeff Cochran

I have a fairly complicated web site with multiple sub-folders running on
W2k server (IIS5?).

I would like to duplicate this to another web site on the same server for
testing. For instance, the current root web of the server is located at
F:\Web. The production site is F:\Web\MyApp. I want to create another site
at F:\Web\MyAppTest.

The only thing that prevents me from just copying everything from one to the
other is the links and includes of the pages, such as:

<!--#include virtual="/MyApp/Shared/Server/DbLibrary.asp" -->
<link REL="stylesheet" TYPE="text/css"
HREF="/MyApp/Shared/Style/Style.css">

I then need to go thru every source file, and change /MyApp to /MyAppTest.

Is there a way to accomplish this via IIS, or by changing the way I
reference the includes and link?

What's the issue? You have a file structure like this:

c:\inetpub\site1\myapp\shared...

You create a new site in a structure like:

c:\inetpub\site2\myapp\shared...

The root on the first is at c:\inetpub\site1, the second is at
c:\inetpub\site2 and all your relative links match just fine.

Jeff
 
B

Bob Murdoch

Tom Kaminski said:
Setup a second virtual server, either using Host Headers or a different
port - then you wouldn't have to change any paths or references. Create
your new server root at F:\TestWeb and copy the files under there to
F:\TestWeb\MyApp.

Do great minds think alike? I did just that exact thing. Thanks for
confirming that it's the right approach.

Bob M..
 
T

Tom Kaminski [MVP]

Bob Murdoch said:
What I wound up doing was to create a new folder F:\WebTest, and copied
everything from F:\Web into it. I then added a new website to IIS,
listening to port 8080. This setup seems to work well, except when the
customer is behind a firewall that only let's port 80 out.

I welcome any other ideas.

Good job.

Use Host Headers then - see my previous post as well as:
http://www.iisfaq.com/Default.aspx?tabid=2523

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserver2003/community/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com
 

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

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top