Jump to content

Unable to Redirect using Policy


guru

18 views

Ran into an issue last night where I had to redirect

https://example.thezah.com/

to

https://example.thezah.com/?idp_id=two

 

Attempted a few different way of redirecting the URI in the Policy and they all didn't work.  Ran into a few issues...

When creating the Redirect_URI policy under the do the following: Replace - HTTP URI - path with value /?idp_id=two at request time

What would happen is when you enter the value /?idp_id=two and save F5 would change it to /\?idp_id=two and my assumption is its using reg-ex to escape the ? so I used the URL encode for question mark which is %3F so it looked like /%3Fidp_id=two and still no luck.

Then realized they were breaking because to use policies you need an HTTP Profile (Client) of http.

Then we added an SSL Profile (Client) with the FQDN in for example.thezah.com and also add the F5 default SSL Profile (Server) called serverssl

The Policy still wouldn't work so created an iRule like the one below

when HTTP_REQUEST {
   if { [HTTP::uri] equals "/" } {
      HTTP::uri "/?idp_id=two"
   }
}

Assigned the iRule to the Virtual Server Resources and now we are in business.

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

Privacy Policy