Redirect from URL1->URL2 but leave URL1 visible in the browser

Hi all,

well, a customer needs this and I did search before posting but none of the suggestions had worked.

So, I have this two URLs and here is what I want the server to do:

If the customer types http://url1 in their browser, they are to be served content from http://url2 BUT the http://url1 they have entered is not to change in the browser. Also, if they request any resource such as http://url1/image.jpg they are to be served http://url2/image.jpg and, again, they should still see what they have typed, i.e. http://url1/image.jpg.

http://url1 points to a Domino server, whereas http://url2 is served from another server by Apache.

What I have so far is a perfectly working redirection, the only issue is that the address of the URL keeps changing.

Any tips greatly appreciated.

Tom

Subject: Redirect from URL1->URL2 … frames?

How about a “virtual server” which puts the user into a page with a single frame, which contains the other server’s version of the page?

But this approach does not support bookmarks to other pages within the site - the URL on top never changes as long as the original frame stays up.

Subject: Redirect from URL1->URL2 but leave URL1 visible in the browser

I might not have a full solution but maybe can give some pointers…

i have done a similar thing in both Lotus notes and in PHP when i did in lotus notes was to make an agent that in ur case would have to be the url1… the agent connects to the second url and streams all htmlcontent into a string. then I just print it out… that way the url will be the agent but all the content will be from url 2… and if u use relative urls on url2 they it will prob look for the images on url 1.

here is some code that might help if u choose this way:

// Create a URL object

URL Rates = new URL(“URL.com - MediaOptions”);

//Open a stream to the URL

BufferedReader inn = new BufferedReader(new InputStreamReader(Rates.openStream()));

//Make use of the content…

parse(inn);

I have a pretty big parse function that would not make much sence in this context but the idea is to pase the stream to output with maybe a printwriter (convert the stream to a string first).

hope this atleast give u some hints

Regards

Johan Sellberg

Webdeveloper at http://www.two.se

Subject: RE: Redirect from URL1->URL2 but leave URL1 visible in the browser

Well, thanks, but the problem is that there are no files, no content, on the URL1. It is more of a cosmetic issue. Simple redirection is very easy to accomplish on a Domino configuration level. It is just about that last bit with the address bar.

Subject: RE: Redirect from URL1->URL2 but leave URL1 visible in the browser

If you are on an intranet this will work: What we do is to use DNS to alias everything to a router that stands in front of the (clustered) server. The router “knows” to do NAT and pass the actual request to the proper server, and, to do NAT before passing the response back to the user.

You could also do this on an existing router, without dedicating one to your Domino server.

In this solution, everything in the app must say “URL1” ; a reference to “URL2/x.jpg” will not be part of the same session, for authentication/access purposes.

Subject: RE: Redirect from URL1->URL2 but leave URL1 visible in the browser

Guys, your help is greatly appreciated but what you suggest is not feasible in my location. :-(Are you telling me that there is no way one can do this on a Domino R6 level?