Forum Discussion
DaveC_53879
Jul 29, 2011Nimbostratus
Inserting 301 returns blank page
The rule below returns a 301 but it also returns a blank page, so somehow my redirect to "http://synergycitizens.org[HTTP::uri]" isn't working. The host names below are not real, but the rule below...
DaveC_53879
Aug 09, 2011Nimbostratus
Aaron and Peter, I found the problem. I inserted the word "Location" after the 301. That works. Thanks for all your help. I really apreciate it. I wouldn't have gotten this far without it.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"www.*" {
HTTP::respond 301 Location "http://ddcpoc.com[HTTP::uri]"
log local0. "[IP::client_addr]:[TCP::client_port]: Redirecting to http://ddcpoc.com[HTTP::uri]"
}
default {
log local0. "[IP::client_addr]:[TCP::client_port]: Doing nothing for [HTTP::host][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