Forum Discussion
IRULE for Redirect, Append and Rewrite
Hello Experts
I want to write irule for below requirement. Please help me out
1- http://www.abc.com/ -> https://www.abc.com/test/login.aspx (http to https and append test/login.aspx to www.abc.com/) 2- https://www.abc.com/ -> https://www.abc.com/test/login.aspx (only append test/login.aspx to www.abc.com/) 3- When I access https://www.abc.com/test/login.aspx, there is some link in httpwatch in response that is http://ajax.googleapis.com. I also want to rewrite this response http://ajax.googleapis.com -> https://ajax.googleapis.com
Regards,
GR
2 Replies
Number 1 and 2 is pretty straight forward but as for number 3 I would insist on that it was made in the code if I were you.
Changing any references in the code via the load balancer instead of thesource would take up unnecessary resources.
If I understood your question number 1 and two should be covered by this iRule:
when HTTP_REQUEST { if { [HTTP::uri] -eq "/" } { HTTP::respond 301 location "https://www.abc.com/test/login.aspx" } }/Patrik
Hi!
You could try the stream feature. Example:
https://devcentral.f5.com/questions/irule-for-rewriting-http-request-with-https-request
/Patrik
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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