Forum Discussion
Shay_Ben-David1
Nimbostratus
Jun 25, 2007http code 301&302
when using irule to redirect example: "HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri] "
i can see in the client that i get HTTP code 302 that means redirects, is there a way to g...
Wil_Schultz_101
Nimbostratus
Jun 25, 2007Here are a couple of examples:
This will take requests for mydomain.com/$uri and 301 to www.mydomain.com/$uri
switch -glob [string tolower [HTTP::host]] {
"mydomain.com" {
HTTP::respond 301 \
"Location" "http://www.mydomain.com[HTTP::uri] " \
"Server" "www.mydomain.com"
}
}
This will 301 everone trying to access the /admin utilities to the homepage
switch -glob [string tolower [HTTP::uri]] {
"/admin/*" {
HTTP::respond 301 \
"Location" "http://www.mydomain.com" \
"Server" "www.mydomain.com"
}
}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