Forum Discussion
Dhruwal_Patel_2
Nimbostratus
Mar 23, 2007Need help for url rewrite
Hello,
I am new to iRule, so i need to clear some doubts if any one can help.
We have a scenario:
We have 2 web servers for which bigip will be balancing.
Things to acheive:
Note: $1 = remaing url with query
1) when a request comes like:
https://www.payment.business.com/product/$1
Then Bigip should modify that and send to webserver in this format
http://www.transaction.com/$1
Once the webserver receives this url, it will do some process and return the url like:
http://www.transaction.com/business/$1
Now BIGIP should remodify it before sending it to the browser who requested as follows:
https://www.payment.business.com/product/$1
Note: Internally servers handle different url, but for customers urls are different, and internal urls are transparent for them.
The script should work for n number of domains.
Is there any1 who can help me to script it?.
Also i am worried about, what if many users access this url at same time, then will bigip manages all the rewrite sessions?
if i am not clear, then please let me know.
- Dhruwal_Patel_2
Nimbostratus
any1 there to help me out please? - First of all, if you are running SSL, then to manipulate the HTTP traffic, you will have to be terminating the SSL on the BIG-IP (otherwise there is no way to inspect the contents of the payload).
1) when a request comes like:
when HTTP_REQUEST { The [string map ...] command will replace all occurrances of "/product" in the original HTTP::uri with an empty string The containing HTTP::uri command sets the URI to this new value. HTTP::uri [string map { "/product" "" } [HTTP::uri]] }
Once the webserver receives this url, it will do some process and return the url like:
http://devcentral.f5.com/wiki/default.aspx/iRules/CodeShare.html
Click hereAlso i am worried about, what if many users access this url at same time, then will bigip manages all the rewrite sessions?
- Dhruwal_Patel_2
Nimbostratus
Thanks Joe, ill come back to this, if i further run in to problems, now i have a start to work ahead.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects