Forum Discussion
Albert__Tase_70
Nimbostratus
Aug 03, 2010adding to a redirect
Hello need some help trying to grab a piece of the uri and append it to the redirect
for example user goes to www.bbb.com wants to get redirect via a 301 to https://bbb.com/yyyy and if t...
hoolio
Cirrostratus
Aug 03, 2010Hi Al,
Are you wanting to parse the portion of the original request from the query string (like a parameter name and/or value) or part of the path?
For an example URL, here are the different portions of the request:
http://www.example.com/path/to/file.ext?param1=value1¶m2=value2
Host - [HTTP::host] = www.example.com
Path - [HTTP::path] = /path/to/file.ext
URI - [HTTP::uri] = /path/to/file.ext?param1=value1¶m2=value2
Query string = [HTTP::query] = param1=value1¶m2=value2
Query string parameter value = value1 and value2, use URI::query workaround to get the values (in pre-10.2 versions):
http://devcentral.f5.com/wiki/default.aspx/iRules/uri__query
[URI::query "?&[HTTP::query] ¶m_name
To further parse the path, you can use URI::path:
http://devcentral.f5.com/wiki/default.aspx/iRules/uri__path
Aaron
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