Forum Discussion
Aaron_Tebo_7015
Nimbostratus
Sep 09, 2009rewrite help
Hello,
I have the following irule to rewrite a url
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: Original URI: [HTTP::uri]"
log local0. "urlrewrite rule"
Check if URI matches first format using scan
if {[scan [HTTP::uri] {/%/app/download.php%(.*)} a] == 1}
{
HTTP::uri "http://www.myserver.com/tools/app/download/vendor/language/installer$a"
}
}
===Log===
When I hit this rule i get the following error in my logs.
TCL error: urlrewritedownload HTTP_REQUEST - bad scan conversion character p while executing scan [HTTP::uri] {/app/download.php.*} a
The url I use to execute the irule is
http://www.abc.com/app/download.php?id=1140000
Thanks,
Aaron
- The_Bhattman
Nimbostratus
Are you trying to append id=1140000 to the following redirect http://www.myserver.com/tools/app/download/vendor/language/installer?id=1140000?when HTTP_REQUEST { log local0. "[IP::client_addr]:[TCP::client_port]: Original URI: [HTTP::uri]" log local0. "Original Path: [HTTP::path]" log local0. "Original Qeury: [HTTP::query]" log local0. "urlrewrite rule" if { ([HTTP::host] eq "www.myserver.com") and ([HTTP::path] eq "/app/download.php") } { HTTP::redirect "http://[HTTP::host]/tools/app/download/vendor/language/installer?[HTTP::query]" } }
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