views:

653

answers:

4

Hi all,

is it possible to redirect an URL www.siteA.com to www.site2.com/Default.aspx?SiteSource=siteA without changing the browser's URL?

Similarly, accessing www.siteA.com/Page2.aspx will redirect to the www.site2.com/Page2.aspx?SiteSource=siteA

A: 

Use a HTML iframe to display www.site2.com/Page2.aspx?SiteSource=siteA, e.g.

<iframe src="www.site2.com/Page2.aspx?SiteSource=siteA" height="800" width="600" border="0" />

More about the iframe tag.

mdm
i can't use iframes, because the page internal urls display site2.
Daniel Schmitz
The other answers that involve fetching data from the remote server using some kind of proxy might be more appropriate then.
mdm
+1  A: 

You can also use mod_proxy (or similar functionality for a different web server) so that the page your server serves is the same as the remote page. But this has some security and performance implications (you're letting the client make your server do arbitrary work copying data across the network from the remote server).

fennec
Search for mod_proxy i found ISAPI Filter. Url: http://blogs.msdn.com/david.wang/archive/2005/08/01/HOWTO_Common_URL_Redirection_Techniques_for_IIS_Summary.aspxmaybe ISAPI can resolve, i´ll try..
Daniel Schmitz
This product : http://www.helicontech.com/isapi_rewrite/ solved the probleman
Daniel Schmitz
A: 

If the URL doesn't change, it's not a redirect. However, you could create a proxy script that fetches the other page, rewrites any URLs within it, then outputs the result.

outis
+1  A: 

server.transfer if on same server

Praveen Prasad
The url will change to site2 ....
Daniel Schmitz
*@Daniel Schmitz:* Have you tried? My experience is that `Server.Transfer` does not change the url in browser. In my case this was not desirable...
awe