Forum Discussion

leonpc01_308189's avatar
leonpc01_308189
Icon for Nimbostratus rankNimbostratus
Jan 30, 2017

Rewrite external URL to an internal URL

I am new to F5 and therefore have a question. I am sure it can be handled by the F5 but want to confirm before having the discussions.

 

We are currently running an application with a url of * There has been a requirement to change the external url to * (The URL that people see in their browser) I can use a redirect but then the old url would show in the client browser.

 

Usually I would do this at the Apache Server level by adding a URL rewrite. I think it would be more efficient to put the rewrite rule in place at the F5.

 

Is this possible and what would the rule look like?

 

Thank in advance

 

Leon

 

3 Replies

  • its possible code should be somewhat like this.

     

    when HTTP_REQUEST {

     

    switch -glob [string tolower [HTTP::uri]] {

     

    "/host/web/content/*" -

     

    HTTP::respond 301 Location ";

     

    }

     

    }

     

    • leonpc01_308189's avatar
      leonpc01_308189
      Icon for Nimbostratus rankNimbostratus

      Thank you for your response. If I use this rule, would it not just redirect to the old url and show the old url in the browser?

       

      So in the browser would I not see in the browser after the F5 redirected the connection?

       

  • I am not fully sure about your requirements but this may help, if your goal is to mask the URI.