Forum Discussion

Jason_Morse_413's avatar
Jason_Morse_413
Icon for Nimbostratus rankNimbostratus
Jun 12, 2012

URI rewrite, pass along the original URL?

I have an iRule that rewrites the URI but I wish to take the original *URL* (not the URI) and add it as "X-Original-URL" to the request headers. Is there a way to access the requested URL?
  • Would something like this work?

     

     

     

    when HTTP_REQUEST {

     

    set the URL here

     

    set URL [HTTP::host]

     

    set custom header

     

    HTTP::header insert X-Original-URL "$URL"

     

    }