Facing Rewrite rule problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux