Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Apache Reverse Proxy migration to F5.

BKA_201457
Nimbostratus
Nimbostratus

Hello all. I would really appreciate some help with this. I am trying to migrate an Apache config to a F5 LTM LB. I understand rewrites, but this one has me baffled. I have tried a few different scenarios and I cannot get it to work as expected. its not as simple as I thought, so I was hoping that someone else has run into this, and can at least guide me in the right direction. Do I need to have a separate request and response in the rewrite, or should I be looking to do this through an iRule? Or both?

 

0691T000006ApZyQAK.png

 

Thanks in advance.

 

2 REPLIES 2

IanB
F5 Employee
F5 Employee

I'm not quite sure what your question is - are you asking for help understanding what your current RewriteRule does (it seems to rewrite "/" to "/ptg/rm"), or are you asking how to implement the same rule in an iRule (or ltm policy), or is the question something else ?

If you were to use a policy, it would be something like this:

ltm policy rewriteurls {
    requires { http }
    rules {
        rewrite_root {
            actions {
                0 {
                    http-uri
                    replace
                    path /ptg/rm
                }
            }
            conditions {
                0 {
                    http-uri
                    path
                    values { / }
                }
            }
            ordinal 1
        }
    }
    strategy first-match
}

Does that help ?

BKA_201457
Nimbostratus
Nimbostratus

I know how to rewrite "/" to "/ptg/rm". I think I am over-thinking it. Thanks for the response. Made me realize that I was looking at it wrong. It just isnt working. Its working through the current reverse proxy configuration, but I cannot get it to work through the F5. I have plenty of others working through the F5, but this one seems different. I'll figure it out. Thanks again.