Forum Discussion

teoiovine's avatar
Icon for Cirrus rankCirrus
Mar 10, 2020

NGINX Migration, Rewrite Profile: Is there another way?

We are migrating, as part of a project, a big NGINX implementation to an F5. Basically, it would assume the role of a reverse proxy.

The two biggest things the NGINX does are:

  1. Translating from external hosts ( to internal hosts (www.example.local)
  2. Load balancing between different back-end servers, depending on the URI.


For the first point:

There are a BUNCH of translations. We're using a rewrite profile. Sometimes, translates to www.example.local/, and translates to And, on a single rewrite profile, there are, I think, more than 50 rules.

Is there a better way of doing this? Should we really modify back-end servers to accept both hosts, external and internal?

And, how do we deal with URI's with no trailing slash? If they have none, it won't match the rewrite rule. Should we add 301 respond to each and every URI?


The second:

Should we use policies or iRules? I've got to confess, we have already big iRules, separated with procs and the like. So, migrating that to policies would be a pain in the ass.


EDIT: One more question: We have different client side URL, that need to be rewritten to the same server. and to www.example.local/. However, for some reason, rewrite profile does not allow for this. How can we achieve it?



1 Reply

  • Below are my inputs to both of your queries -


    1. Any of above mentioned kind of translations cab be achieved using iRules/policies.
    2. This can be achieved using both, policies and iRules. But best way is to use policy instead of iRules.