Forum Discussion
Brendan_Deasy_8
Nimbostratus
Apr 24, 2007URL-uri rewite - pass uri as wildcard to url parameter
Hello,
I need to write a rule that will rewrite a uri and pass it as a url parameter.
Example:
www.company/foo
www.company/bar
I need the rule to output as:
www.company.com/newuri/index?page=foo
www.company.com/newuri/index?page=bar
Thanks in advance!
Brendan Deasy
1 Reply
- hoolio
Cirrostratus
You can get and set the URI with HTTP::uri. If you want to change the host, you can use HTTP::header replace Host NEW_HOST.when HTTP_REQUEST { set new URI HTTP::uri /newuri/index?page=[HTTP::uri] log local0. "new uri: /newuri/index?page=[HTTP::uri]" set new Host header HTTP::header replace Host www.company.com log local0. "replaced Host header" }
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