Hi,
To avoid having multiple configurations clientside or one webserver per application we would like to randomly alternate between two directories at a server level. I would like to know how i can get the rewrite to randomly select a rule. My idea was that
i could have two rules which have a custom condition that will return 0 or 1 randomly. Is this possible? or could this result in both rules getting 0 for the condition meaning that no rewrite would occur?
I am not sure if this is the correct location as sounds more like an IIS server variable question now that i have written this post haha.
Ionic's Isapi Rewrite Filter seems to cater for this but i would rather use the IIS7 rewrite addon. To give you a better idea of what i am trying to achieve I have included a section from Ionic's documentation:
"This is like the Standard Plain Text mapType described above but adds a post-processing step: the looked-up value is split by | characters, and one of the options is then selected at random. For example, you might use the following map file and directives
to provide a random load balancing between several back-end servers, via a reverse-proxy. Requests for images, stylesheets, and scripts are sent to one of the servers in the 'content' pool; all other requests go to one of the servers in the 'appservers' pool."
----EDIT
I just realised i can do this with a pattern against the remote address. will use the last digit of the IP address. However I would still like to hear if this is possible or if there are other smarter options.
Thanks!
----Second EDIT
Another (possibly better idea). Just creating a seperate website on the server and binding it to a different IP or hostname and adding it to the server farm.
Still curious for soluitions to that question.
Thanks!