Re: RewriteMap and patterns

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

 



Hi,

First make the proper redirections:

  RewriteEngine on
  RewriteMap lsv2ids "txt:/etc/httpd/conf.d/linuxsecurity-lsv2ids.map"
  RewriteRule "/content/view/(.*)" "${lsv2ids:$1}" [R,L]

Define the fallback for requests not ending in PHP but for which I hand the php handler to deal them.
  FallbackResource /index.php

Define the handler for php file requests
<FilesMatch \.php>
  SetHandler "proxy:unix:/run/php-fpm/linuxsecurity.sock|fcgi://localhost"
</Filesmatch>

Can I ask about this again? I've got this all set up with a static map, but request for /content/view/NNNNN where NNNNN is some key that is not mapped to a value results in a 400 error.

Without this rewritemap/rewriterule, the request falls through to Joomla where a redirection.php script is called that maps the key to the corresponding value in a database.

With the rewritemap/rewriterule, it appears it doesn't fall through to the redirection.php script when there is no match.

Maybe I'm missing the role of the FallbackResource here? However, it doesn't appear it takes an argument - only an environment variable, so not sure how that would apply.

Ideas greatly appreciated.



[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