Forum Discussion
Shay_Ben-David1
Nimbostratus
19 years agohttp 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
19 years agoHere 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"
}
}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