Forum Discussion
1000blocks
Nimbostratus
Jul 07, 2016301 iRule redirection generating an extra 301 status code?!?
Hi,
We have this iRule in place for 301 redirection...
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] eq "sitename.com" } then {
HTTP::respond 301 Location ...
Chris_Grant
Employee
Jul 07, 2016If I had to hazard a guess I'd say that you have two Virtual servers at play here. Based on the iRule posted I would expect https://sitename.com to redirect to https://www.sitename.com, so that I can't explain. I am guessing that you have another virtual server listening for connections to www.sitename.com:80 and redirecting to :443, which accounts for the second.
My recommendation would be to add some logging to your iRule and take an httpwatch capture while it's connecting. You can then compare the logs on the bigIP with the httpwatch and see what is actually happening.
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