Forum Discussion
James_Hamoline_
Nimbostratus
Sep 20, 2005301 Redirection via iRule
I currently have an iRule that redirects users. However, HTTP:redirect does a temporary redirect (HTTP Status Code 302). I want a permanent redirect (HTTP Status Code 301).
Here is the iRule...
Sep 20, 2005
You could use the "HTTP::respond" command to send any HTTP response code you want back to the client.
Usage:
HTTP::respond [content ]
Give this a try:
when HTTP_REQUEST {
HTTP::respond 301 "Location" "http://www.[HTTP::host][HTTP::uri]"
}
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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