Forum Discussion
Gbps_31870
Sep 11, 2012Nimbostratus
iRule for replace URL characters and do Base64 Encoding
Hi,
Is is possible to achieve the below scenario.
URL: www.example.com/xyz/xyz.do?asar=equal?x=xyzw.xyzw.abcd
The requirements:
- Check if the URL start with "www.ex...
Gbps_31870
Sep 11, 2012Nimbostratus
I made the below iRule which was mainly from your valuable inputs kevin and what I found in devcentral, and it seems to be working fine.
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/xyz/xyz.do?asar=equal?x="} {
set uri [findstr [HTTP::uri] asar=equal?x= 15 ]
set enc_uri [b64encode $uri]
HTTP::redirect "www.example.com/xyz/xyz.do?asar=equal&x=$enc_uri"
log local0. "uri=$uri and Encrypted URI=$enc_uri"
}
}
Your inputs are really appreciated and helpful.
BR,
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