httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bluedimp rapor <blued...@gmail.com>
Subject [users@httpd] Facing Rewrite rule problem
Date Mon, 24 Oct 2011 10:36:26 GMT
Hi,

I am working on http rewrite rules and faced the following issue.

I have to redirect the incoming urls based on a url pattern and I have
written the following rule

    RewriteCond %{QUERY_STRING} pattern
    RewriteRule ^(.*) http://example.com/$1 [R=permanent,P,NE]

but I am facing the issue that all the http requests triggered by the
original http request (before redirection) are not getting redirected

I have solved the above problem by using {HTTP:Referrer} but all the
requests that are inturn triggered by above request are not redirected. Any
help?


Example


Http Request 1 ->redirect based on URL parameter
   |
   |
   |
   |--->Http Request 2 (Referrer is http Request1: We can use HTTP:Refferer
to redirect this request)
        |
        |
        |
        |
        |--->HTTP Reuest 3 (Referrer is http Request 2) How to redirect this
request


In brief I want to redirect all the requests to which original URL is
referrer and those inturn are referrers to some other requests to One single
host based on URL rewrite. Any suggestion?

Mime
View raw message