Forum Discussion
irules URL redirect
Hello people
I have an application running apache.
The app responds by URL http://app1example.com/example/url.pl
I need to create a redirect in F5, which to the digital URL http://app1example.com, it does the redirect to the URL http://app1example.com/example/url.pl
I made the irules as follows:
when HTTP_REQUEST { if {[HTTP :: path] eq "/"} { HTTP :: redirect "; } }
But it's not working. What can it be ?
- oguzy
Cirrostratus
Hi Rodrigo,
When you try to create this irule, you should get an error like [undefined procedure: HTTP][HTTP :: path]. The same issue happens also for HTTP :: redirect. You just discard the blanks after and before colons, then it should work.
when HTTP_REQUEST { if {[HTTP::path] eq "/"} { HTTP::redirect "http://app1example.com/example/url.pl"; } }
Now it worked !
Thank you
- oguzy_191375
Nimbostratus
Hi Rodrigo,
When you try to create this irule, you should get an error like [undefined procedure: HTTP][HTTP :: path]. The same issue happens also for HTTP :: redirect. You just discard the blanks after and before colons, then it should work.
when HTTP_REQUEST { if {[HTTP::path] eq "/"} { HTTP::redirect "http://app1example.com/example/url.pl"; } }
Now it worked !
Thank you
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