Forum Discussion
steve_cross_650
Nimbostratus
Feb 01, 2007using ends_with crashed my site -- what am I doing wrong?????
i have a https virtual server that i was trying to implement a simple rule
* if this https request is not one of five select pages, redirect user to http page
here was my initial rule:...
Feb 01, 2007
A couple of things I've noticed.
1. You don't need a matchclass if you are just comparing two strings.
2. Your HTTP::redirect has a space after the "http://" and the [HTTP::host]. This will result in the following url: "http:// foo.com /bar". Odds are this is what is causing your network is unreachable error.
Try this out:
when HTTP_REQUEST {
if { [matchclass [string tolower [HTTP::uri]] starts_with $::secure_pages]} {
pool public_http_pool
} elseif { [string tolower [HTTP::uri]] ends_with ".aspx" } {
HTTP::redirect "http://[HTTP::host][HTTP::uri]"
}
}-Joe
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
