Forum Discussion

stheron_82150's avatar
stheron_82150
Icon for Nimbostratus rankNimbostratus
Jul 19, 2010

Suppressing URI content shown in a browser

Great forum with fantastic advice ! - Is there a way to suppress a portion of the URI in a client browser using an iRule ?

 

 

Instead of the user seeing :

 

 

https://www.myapplication.com/solutions/Documents/Preview.aspx?ldUid=2db3deae-4e91-df11-9GG72-001cc448da6a&ru=%2Fatlas%2FDocuments%2FBrowseDocuments.aspx%3FfUid%3Dfc2b8838-4e91-df11-9372-001cc448da6a%26PageNumber%3D0

 

 

URI components are "hidden" by an iRule and the user only sees:

 

 

https://www.myapplication.com/Preview.aspx

 

 

The application however still need the original post/get to work - I just want to hide it at the presentation layer.

 

 

 

4 Replies

  • Hi,

     

     

    Welcome. Glad you find the forums useful.

     

     

    Can you provide a bit more background on what you're trying to accomplish and why?

     

     

    Do you always want /preview.aspx to be rewritten to a static string of /solutions/Documents/Preview.aspx?ldUid=2db3deae-4e91-df11-9GG72-001cc448da6a&ru=%2Fatlas%2FDocuments%2FBrowseDocuments.aspx%3FfUid%3Dfc2b8838-4e91-df11-9372-001cc448da6a%26PageNumber%3D0?

     

     

    If so, you could use a simple iRule to do this. If it's more dynamic than that, chances are it won't be practical to implement in an iRule. Here are a couple of related posts:

     

     

    http://devcentral.f5.com/Forums/tabid/1082223/asg/50/showtab/groupforums/aff/5/aft/27788/afv/topic/Default.aspx

     

     

    http://devcentral.f5.com/Forums/tabid/1082223/asg/50/showtab/groupforums/aff/16/aft/22378/afv/topic/Default.aspx

     

     

    Aaron
  • The URI will constantly change so it looks from your previous posts that either an encryption iRule (or better include this in the app code) or stream(?) functionality could be a solution ?

     

     

    The goal is just to show the user a simplified URI in the browser instead of a very long one for cosmetic reasons. 99% of the application functionality is controlled by Java controls on the page.

     

     

  • If you just want to publish short, user-friendly URIs and have LTM rewrite them to the full URI, you could use a datagroup which maps each short URI to the long one. For 9.x, you'd define the source and target on a single line using a space as a separator in a string datagroup. You could then use findclass to search for the requested URI and rewrite it to the corresponding long URI. For 10.x, you could use the new name/value pairs in a string datagroup and the class command to look up the value. Here are the wiki pages for these commands:

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/class

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/findclass

     

     

    Aaron
  • I don't think that will work in our environment since we will have tens of millions of mappings to include, but I'll read up on your recommendations.

     

     

    Thanks !