Forum Discussion
Simple URL redirect iRule
RFC2616 states that the Location header in an HTTP redirect needs to be an absolute URI.
https://tools.ietf.org/html/rfc2616section-14.30
That said, clearly all modern browsers support relative URIs, and indeed the standard that deprecates 2616 (7231) changed this wording to include relative URIs in the Location header.
But, and I'll quote from a thread on Stackexchange,
"However, until the HTTPbis draft some day becomes the official standard and gets widely adopted, there will always be some new or obscure user agents that implement the current standard to the letter and only accept absolute URLs. Thus, the safe thing to do, for now, is to only use absolute URLs in Location headers..."
And I'll also provide here an interesting article on why relative URIs can be troublesome:
https://yoast.com/dev-blog/relative-urls-issues/
It is for these reasons that I generally always recommend an absolute URI in HTTP redirects.
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