Re: Experience in mod_rewrite in Apache 2.2

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

 



On 5/22/07, Dmitriy Gorbenko <bazil@xxxxxxxxxxxx> wrote:

I think I could do it using mod_rewrite, but now I understand, that I
can't: in apache config file I can create rules, which will makes an
decision: redirect or proxy request of client (R and P flags).
But by using external program I can't make such decision.
And that is a problem.

Ahhh, so your question is: how do I activate rewrite flags from a prg:
RewriteMap. (Not at all clear from your first email.)

Indeed, this can't be done directly, but it can be easily done
indirectly. For example, have your map program prefix the URL with
proxy: or redirect: depending on what you want, and then:
RewriteRule ^(.+)$ ${rd:%{THE_REQUEST}}
RewriteRule ^proxy:(.*)$ $1 [P]
RewriteRule ^redirect:(.*)$ $1 [R]

(Use the RewriteLog to debug!)

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[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