Forum Discussion
conradberg_1034
Nimbostratus
Jan 28, 2010stripping the beginning / from uri
I need an I rule that will only take affect if the is no "." in the uri, take a url like this:
http://test.com/test and make hit the server like this:
http://test.com/Default.aspx?=test
This almost works:
when HTTP_REQUEST {
if { not ([HTTP::uri] contains ".") } {
HTTP::uri "/Default.aspx?=[HTTP::uri]"
}
}
but I end up with this:
http://test.com/Default.aspx?=/test
I need to replace Default.aspx?=/ with Default.aspx?=
What is the simplest solution for this?
- The_Bhattman
Nimbostratus
Hi Conrad,when HTTP_REQUEST { if {[HTTP::uri] ne "." } { set uri_string [string tolower [string range [HTTP::path] 1 end]] HTTP::uri "/Defaut.aspx?=$uri_string" } }
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