Forum Discussion
https Redirect with and without folder
Strange maybe the f5 thinks that /# is a query and not part of the path atribute and this is why https://example.com/#/login matches the first rule as the F5 irule path option thinks that https://example.com/#/login is https://example.com/.
Try using F5 URI HTTP::uri and maybe do somethink like:
when HTTP_REQUEST {
if { [HTTP::path] eq "/" && not ([HTTP::uri] contains "#/login") } {
HTTP::redirect "https://example.com/content"
}
The not ([HTTP::path] contains "#/login") will exclude this URI from matching the first if statement. In other words the two conditions should be matched for the first if statement.
Read:
https://clouddocs.f5.com/api/irules/HTTP__uri.html
https://clouddocs.f5.com/api/irules/not.html
https://clouddocs.f5.com/api/irules/Operators.html
For basic irule knowedge you may check and I think you got the basic idea from what you have done so far:
https://devcentral.f5.com/s/articles/irules-101-01-introduction-to-irules
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