need to redirect to static url based off of string patter match in uri

Posted on

need to redirect to static url based off of string patter match in uri – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about mod-rewrite, apache-2.2, mod-proxy, regex, .

I have siteminder protecting an Oracle ADF java faces app. It appears I am going to have to intercept an http reqeust for the logout link delivered by Oracle in order to kill the siteminder session. I have narrowed it down to a parameter in the URI logout=true always being present when a user is logging out. I would like mod_rewrite to find this string and redirect to a static logout page defined locally to the apache proxy.

Is this feasible?

Solution :

RewriteEngine on
RewriteCond %{QUERY_STRING} ^(.*)logout=true(.*)$
RewriteRule .* http://yourserver/your_static_uri [R,L]

Yes.

RewriteEngine    On
RewriteCond      %{QUERY_STRING}=".*logout=true.*"
RewriteRule      .* /path/to/other/location

You should really read the mod_rewrite documentation. There’s a lot you can do with it.

Leave a Reply

Your email address will not be published.