Forum Discussion
jato_40959
Nimbostratus
Jun 02, 2010Redirect 301
I have implemented this irule in my system:
when HTTP_REQUEST {
HTTP::respond 301 Location https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
The irule isn't working, ...
jato_40959
Nimbostratus
Jun 02, 2010Posted By Michael Yates on 06/02/2010 09:05 AM
A 301 HTTP Status Code is a "Moved Permanently" message, but you are only doing an HTTP to HTTPS Redirect to the same website.
Using the HTTP::host would in this redirect this way would create an endless loop. You have to give it somewhere else to go:
when HTTP_REQUEST {
HTTP::respond 301 Location "https://www.differentwebsite.com[HTTP::uri]"
}
Thank you Michael, i think this may be ok.
If you just want to do you HTTP to HTTPS Redirect, try this:
when HTTP_REQUEST {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects