Forum Discussion
flefranc_29890
Nimbostratus
Sep 12, 2008rewrite the uri seen by the user
Hello,
One example :
the server return http://hostname.domainname/urireallylong
I want the users see only a simple uri like :
http://hostname.domainname/urishort
How can I do ? With a redirect command I change the uri send to the server not what the user see. Help will be appreciated.
Sincerely
flefranc
- hoolio
Cirrostratus
Do you want to rewrite the URL in the Location header of a redirect or in the page content? If the former, you can use check for 30x redirect responses, and rewrite the Location header using 'HTTP::header replace Location "http://newurl.example.com/newuri". If you want to rewrite the response data, you can use a stream profile and STREAM::expression to perform the rewrite. If you clarify where you want to do the rewriting, we can provide more detailed examples. - flefranc_29890
Nimbostratus
Hello, - hoolio
Cirrostratus
Can you provide more detail on the vulnerability in the application as well as what you want to do with an iRule to fix it? - flefranc_29890
Nimbostratus
Hello, - hoolio
Cirrostratus
Hi Frederique, - flefranc_29890
Nimbostratus
Hello, - hoolio
Cirrostratus
If you want to truly hide the real URI from the client you would need to parse every link to the virtual server in response headers and content, encrypt it and then replace the original link with the encrypted version. On subsequent requests, you'd need to decrypt the requested URI before sending the request to the web server. This isn't a trivial iRule. I wouldn't suggest trying it if it's your first attempt at writing an iRule. Short of encrypting the URI, you could hide the URL by not including an address bar in the window. This is very simple to bypass though using a browser plugin like LiveHttpHeaders, an interception proxy, or by capturing a tcpdump. So it wouldn't provide anything but a cosmetic fix for the problem.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects