Forum Discussion
dgloff_22332
Nimbostratus
Sep 20, 2012switch used for string replacement skipping one case
I have to do a redirect from default.asp and default.aspx in any path, to just the path (with no filename), with a few exceptions. Initially, I had the following iRule, which worked fine:
when ...
dgloff_22332
Nimbostratus
Sep 24, 2012Think I found the issue. At one point I had the .aspx and .asp portions of the rule in the incorrect order, and since this is a 301 and not a 302, my browser was caching the permanent redirect and not even trying to reach the page. I discovered this because I was still getting redirected even when the iRule wasn't in place.
Just tested it as in my OP, and it's working now (in several different browsers). I was not able to collapse it into the short form:
"/accountants/*"
"/businesspartners/*"
"/product/health-insurance/*"
"/helpkb/*" {
return
}
as it throws an error every other line when I attempt to save. That might be a newer function of 10.x or 11.x. No worries, I'm fine with the separate listings. Thanks for the help guys!
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
