Forum Discussion
nrg2brn_163859
Nimbostratus
Mar 23, 2015redirects with * on the end....not working
basic redirect with a twist. I thought my little * symbol would mean ANYTHING after the =, no matter what, redirect to the new site...but it doesnt. im looking into maybe needing a single quote aroun...
StephanManthey
Nacreous
Mar 23, 2015Hi,
the "starts_with" comparison should do the job:when HTTP_REQUEST {
if {[string tolower [HTTP::uri] starts_with "/erma/login.htm?action=search&token="} {
HTTP::redirect "https://ecms.epa.gov/erma2/login.htm?action=search"
}
}
Please keep in mind, that query parameters in different order will break the logic.
With[HTTP::path] and [HTTP::query] you have access to the URI components.
Use [string tolower ] to be case insensitive.
Thanks, StephanHelp 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