Forum Discussion
12 Replies
- natheCirrocumulus
few options depending on if there are any more specifics to your use case. here are two:
when HTTP_REQUEST { HTTP::uri "/test/mypage" }
or
when HTTP_REQUEST { if { [HTTP::path] equals "/" } { HTTP::uri "/test/mypage" } }
Check out the iRules wiki for help with any other requirements. Loads of examples to help.
N
- Mariappan_S_156Nimbostratus
Hi,
Pls try below.
when HTTP_REQUEST { if { [HTTP::host] equals "https://example.com" } { HTTP::redirect "https://example.com/test/mypage" } }
Regards, Mariappan S
- sandy16Altostratus
None of these is working for me. It does NOT get redirected to the proper URI.
- Brad_ParkerCirrus
Give this a try:
when HTTP_REQUEST { if { [HTTP::uri] equals "/" } { HTTP::redirect "https://[HTTP::host]/test/mypage" } }
Also, it looks like you're trying to do this on HTTPS, is your virtual server SSL? If so you will require a client SSL profile and an HTTP profile to do this. If you want HTTPS terminated at the server, you will also need to use a server SSL profile.
- sandy16AltostratusBrad, that worked...thanks.. Cheers !!
- Brad_ParkerCirrusPlease, mark as answered.
- natheCirrocumulusGood one Brad
- Brad_Parker_139Nacreous
Give this a try:
when HTTP_REQUEST { if { [HTTP::uri] equals "/" } { HTTP::redirect "https://[HTTP::host]/test/mypage" } }
Also, it looks like you're trying to do this on HTTPS, is your virtual server SSL? If so you will require a client SSL profile and an HTTP profile to do this. If you want HTTPS terminated at the server, you will also need to use a server SSL profile.
- sandy16AltostratusBrad, that worked...thanks.. Cheers !!
- Brad_Parker_139NacreousPlease, mark as answered.
- natheCirrocumulusGood one Brad
- sandy16Altostratus
I will try this. I am applying this irule on a SSL VS. It`s a case of end-to-end SSL to i have a client and a server SSL profile applied. The VS works if i open the exact url/uri which is: https://example.com/test/mypage whereas does NOT give me the proper page/content with https://example.com