Redirecting URL Path to another host?

Posted on 2006-04-14
Medium Priority
Last Modified: 2011-09-20
mywebsite.com is hosted and load blanced across 3 servers. However I want mywebsite.com/site1 to point to a different host and website all together running different applications. What I'm doing now to acheive this is have mywebsite.com port 80 and 443 load balanced across the 3 servers and have port 444 be the other host/site/application. So when users go to mywebsite.com:444 they are able to access the other site.

I want to replace mywebsite.com:444 with a friendly url like mywebsite.com/site1. Is this possible using IIS 5.0/6.0?

Virtual Directories dont work because of the runtime code/dll's native to site1.

Question by:stylinm3
  • 2
LVL 18

Expert Comment

by:Sam Panwar
ID: 16458773
Two ways:

1.Through ASP redirect script : Create a HTTP ASP redirect script and upload on domain
'http://mywebsite.com' as Index.asp.It will redirect your http request to domain or folder  'https://mywebsite.com/site 1'.

2. Through IIS host header: The Host header of the domain will be create through IIS
In IIS there is option of redirect domain

Sample Script for redirect (make a index.asp file )

<%Response.Buffer = True %>
<%Response.Redirect "https://mydomain.com/site/index.aspx"%>

Another Way is round robin :

A>Enable Round robin the Advanced tab of Server Properties.
B>) Create at least two A records that will be round robin'd for each new query for said name.
[url]www.mydomain.com[/url] A
[url]www.mydomain.com[/url] A
[url]www.mydomain.com[/url] A






Author Comment

ID: 16458941
Thanks for the reply.

I can put a redirect page to send requests to another domain but I would like to keep the same domain. Redirecting to another directory will cause it to stay on the same host (ip address) unless I specify a different port.

Host headers is a good idea, but it does not support directories.

mywebsite.com corresponds to an IP address/host. I want mywebsite.com/site1 to correspond to another IP address/host. mywebsite.com and mywebsite.com/site1 are 2 completely different sites such as yahoo and google. I just want to comine them into one domain.

Similar to a layer 3 PAT or NAT, i want to do an address translation on layer 4.. is it possible?
LVL 18

Expert Comment

by:Sam Panwar
ID: 16466612

Cn you try useing directories like full path of the domain .

Then you have to use the script which is tell you

<%Response.Buffer = True %>
<%Response.Redirect "https://mydomain.com/site/index.aspx"%>

In the script language this is possible.

Layer 4

NAT is possible on the Layer 3 so i think layer 4 does not support

See the following links

Good site http://computer.howstuffworks.com/nat3.htm

A layer 3 device to know about all the layer 4 checksums and to change then appropriately.  It doesn't work that way.  You need to use protocols that don't have higher-layer checksuns that depend on the layer 3 header, or stop asking the router to manipulate destination addresses. No.  and The router functionality should just forward packets without
looking at the layer 4 stuff.  
Filtering in UDP and TCP is very simple "look N bytes into the frame, dropit if you see XYZ".  There is no layer 4 understanding at all.  (Yes, site Manager provides cool macros with layer 4
terminology, so you can say "TCP Port" instead of "0 bits from the end of the Layer 3 header, 16 bits long", but the router code itself doesn't understand Layer 4.)
LVL 34

Accepted Solution

Dave_Dietz earned 375 total points
ID: 16496590
There is no way to do this natively in IIS and no real way to do it using DNS.

About the only way I can think of to get this functionality would be to use something like the Pro version of ISAPIRewrite (www.isapirewrite.com) and configure it to watch for requests to the /site1 URL and *proxy* them to the appropriate address.

Dave Dietz

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
What You Need to Know when Searching for a Webhost Provider
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month17 days, 10 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question