Forum Discussion
Misty_Spillers
Nimbostratus
Feb 28, 2012Redirecting 404 to a friendly page by uri
I have done lots of searching and have even come across posts of exactly what I want to do but is doesn't seem to work for me. I'm wondering if I'm running into a problem because I'm running 9.4.4 but...
Misty_Spillers
Nimbostratus
Feb 29, 2012I'm sorry one more question. What if it was a vanity domain (controlled by host header) on the same VIP that I refer to above. would it work too? something like
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
}
when HTTP_RESPONSE {
switch [HTTP::status] {
"404" {
switch -glob $host {
"*.vanitydomain.com/*" {
HTTP::respond 301 \
"Location" "http://www.vanitydomain.com/moved.html" \
"Server" "www.vanitydomain.com"
}
}
}
}
}I'm not sure if I'm even close on this nor how to stick it in the other irule.
I again really appreciate the help, I'm learning a lot.
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
