Forum Discussion
Migrating from IIS - URL rewrite issue
Hi Dario,
Thank you for you answer.
Unfortunatly, I can't use a pool. That www.def.com/ghi was an example. I should be able to process anything, as a wildcard, that comes after URL= . Our software developers need to be able to put in any address they need after URL= without having to notify the F5 admin.
Thank you
Stephane
- Oct 21, 2020
Hello Strich.
Using a pool is relatively easy. With this iRule I'll have everything working properly
when HTTP_REQUEST { set url "https://[getfield [HTTP::uri] "URL=" 2]" set host [URI::host $url] set path [URI::path $url] set basename [URI::basename $url] HTTP::uri $path$basename HTTP::host $host }
If I test it with curl I've got this:
# CUSTOMER REQUEST TO BIG-IP GET /URL=www.wyz.com/app HTTP/1.1 User-Agent: curl/7.19.7 Accept: */* Host: www.abc.com # BIG-IP REQUEST TO BACKEND GET /app HTTP/1.1 User-Agent: curl/7.19.7 Accept: */* Host: www.wyz.com
If you don't want to specify a pool in order to use it for a generic purpose then you need to include more logic in that iRule. One possible way to get your goal is to construct a sideband connection.
Try it, but from my perspective, it's better to configure an Access Portal using APM instead of configure that with an iRule. The URL structure is going to be slightly different, but it will be easier to configure it.
This is the URL structure using an Access Portal:
www.abc.com/f5-w-<HEX_equivalent_of_backend_FQDN>$$/uri
If this was helpful, please don't forget to mark my answer as "the best" to help me for the contribution.
Regards,
Dario.
Recent Discussions
Related Content
* 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