Forum Discussion
Matt_H_58911
Nimbostratus
Feb 16, 2009To "/" or not to "/"
Hey all,
I have a weird one. I have a quick iRule that looks for a string and depending on the string forwards my request to a pool
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"/keysadmin*" -
"/uninstall*" -
"/link*" {
pool App_pool
log local0. "HTTPS App Pool chosen."
}
default {
pool Web_Deck_pool
log local0. "HTTPS Web Deck Pool chosen."
}
}
log local0. "[HTTP::uri]"
}
For the above iRule if I go to:
https://www.domain.com/keyad/ I get the expected page
if I go to https://www.domain.com/keyad I am redirected to a 404. Can I have the above iRule add the / for me so it works?
- Matt_H_58911
Nimbostratus
ooops.. - hoolio
Cirrostratus
You could try, but it's hard to guess from an iRule which requests are files which should be left alone and which are directories which should end in a forward slash. - hoolio
Cirrostratus
Are you redirected to http://www.domain.com/keyadmin/ and then get a 404? If so, you can enable rewrite redirects on a custom HTTP profile and add that to your HTTPS VIP to fix this. Try searching on AskF5.com or in the forums here for "rewrite redirects" for details. - Matt_H_58911
Nimbostratus
Yes I am redirected to http://www.domain.com/keysadmin/ - hoolio
Cirrostratus
If you specify All or Matching for rewrite redirects, LTM won't modify the URI--it will rewrite the protocol from http to https in the Location header. So the IIS servers will send a redirect to http://www.domain.com/keysadmin/ and LTM will rewrite it to https://www.domain.com/keysadmin/. - Matt_H_58911
Nimbostratus
Hey guys.... Thanks! I have created an http profile and enabled the Redirect Rewrite to "Matching" and that did what I needed.
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