Most important part is to enable Cookies with JunctionRewrite:
JunctionRewrite On UseCookie
Configuration of iNotes Web Redirect Database: Use the MailServer option and configure the Domain name and Proxy Server URL.
The problem with MailServer option in "iNotes Redirect" db is that it only changes the first URL.. The other subsequent HTTP request still try to connect the Proxy server without appending homeserver name, and the error will coming up in normal scenario. Now, with use of Cookie, ReverseProxy server remembers which server was last used.
Therefore, now with this setup the first request will go to Server1.
After authentication, iwaredir.nsf database will redirect the first URL to "http://server.demo.com/server1" OR "http://server.demo.com/server2" based on Homemail server.
At this moment JunctionRewrite will store the server information in Cookie.
All subsequent requests to server without "/server1/" in URL will still be able to reach the correct server because of this cookie.
My server setup:
Following are the rules that I have used:
map /server1.demo.com/* /server1/*
map /server2.demo.com/* /server2/*
JunctionReplaceURLPrefix http://server1.demo.com/* http://server.demo.com/server1/*
JunctionReplaceURLPrefix http://server2.demo.com/* http://server.demo.com/server2/*
proxy /server1/* http://server1.demo.com:81/*
proxy /server2/* http://server2.demo.com:82/*
proxy /* http://server1.demo.com:81/*
ReversePass http://server1.demo.com:81/* http://server.demo.com/server1/*
ReversePass http://server2.demo.com:82/* http://server.demo.com/server2/*
Please let me know if you want more details on how to setup the Websphere Cache Proxy Server.