Forum Discussion
together_183451
Nimbostratus
Feb 13, 2015Need help to redirect all url from http to https
when HTTP_REQUEST {
set uri_lower [string tolower [HTTP::uri]]
if { $uri_lower starts_with {/test1}} {pool test1_Pool}
if { $uri_lower starts_with {/test2} {pool test2_Pool}
if { $uri_lower starts_w...
together_183451
Nimbostratus
Feb 14, 2015Also can you please explain me difference between url and uri
StephanManthey
Nacreous
Feb 14, 2015Hi together,
the URL is the resource locator as entered in the browser:
i.e. http://www.domain.bit/mypath/myobject?myquery
The browser is splitting this information and takes the protocol (http), hostname (www.domain.bit) and uri (/mypath/myobject?myquery) and crafts an HTTP request to be send via port 80 due to http-protocol default setting:
GET /mypath/myobject?myquery HTTP/1.1
Host: www.domain.bit
The iRule reads the request parameters:
[HTTP::host] returns the value of the host-header (www.domain.bit)
[HTTP::uri] returns the path and query information separated by questionmark (/mypath/myobject?myquery)
[HTTP::path] returns the path related part of uri (/mypath/myobject), leading slash is always included
[HTTP::query] returns the query related part of uri (myquery) without the questionmark prefix
Please see details on these and other functions in the related Wiki here on DC:
https://clouddocs.f5.com/api/irules/HTTP.html
Thanks, Stephan
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