Forum Moderators: phranque

Message Too Old, No Replies

URL Masking/Rewriting in IIS

How to forward all requests in an IIS sub-folder to another website

         

twmmason

4:36 pm on Mar 1, 2006 (gmt 0)

10+ Year Member



Hello All,

I've been having trouble solving a problem I've been having recently. I have a main site that includes folders such as CSS and IMG for my resource files. Lets call this www.site1.com. I also have another site stored in www.site1.com/site2 that uses files in the same resource folders (www.site1.com/css etc).

I am looking to forward all requests to www.site2.com/*.* to www.site1.com/site2/*.* but WITHOUT rewriting the URL. In other words, I want it to look as though the user is browsing www.site2.com but actually all the content is actually coming from www.site1.com/site2.

I know I can forward all requests using something like the RemapURL tool in the IIS resource kit but this will actually change the address in the browser. Also, I don't want to use Frames to mask the URL as Google will still index the original URLs through the page links.

Is this completely impossible and am I wasting my time or does anyone know of a way to get around this?

Many thanks,

Tom

LifeinAsia

7:08 pm on Mar 1, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



For site2, just use IIS Admin to set the Home Directory to the /site2 folder of the site1 site. In other words, if the Home Directory of site1 is C:\websites\site1, make the Home Directory of site2 to be C:\websites\site1\site2

After doing this, religiously check all the pages to make sure all the links, graphics, css files, etc. are setup correctly.

twmmason

8:40 am on Mar 3, 2006 (gmt 0)

10+ Year Member



Unfortunately that would mean changing all the links in all of the pages on the site. I was looking for a way that IIS would intercept the request and mask/change the URL.

LifeinAsia

4:36 pm on Mar 3, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



WITHOUT rewriting the URL

I was looking for a way that IIS would intercept the request and mask/change the URL.

So, which is it? Can you give some examples of what you're trying to accomplish?