Re: [users@httpd] RewriteMap and patterns

2024-03-29 Thread Yann Ylavic
On Sun, Mar 24, 2024 at 2:31 AM Dave Wreski wrote: > > I'd like to be able to use the static map for the IDs I do know, and send any > others to the redirect script directly from within my apache config directly. > Is this possible? > > Something like this: > > RewriteEngine on > RewriteMap

Re: [users@httpd] RewriteMap and patterns

2024-03-28 Thread Dave Wreski
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.   F

Re: [users@httpd] RewriteMap and patterns

2024-03-28 Thread Dave Wreski
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.   F

Re: [users@httpd] RewriteMap and patterns

2024-03-23 Thread Dave Wreski
Hi, What I would do is RewriteRule with just [L] tag for internal redirection or [R,L] if you don't mind the redirection to be external. Since I haven't seen the whole configuration my guess is you don't have the proper handler defined for the resulting url and that's why you get a 404, and

Re: [users@httpd] RewriteMap and patterns

2024-03-15 Thread Daniel Ferradal Márquez
On 12/03/2024 20:45, Dave Wreski wrote: If I understood correctly you want the resulting path to be loaded by your php-fpm backend. Do you have a fallbackresource, such as: "FallbackResource /index.php" or similar? If not, then you may want to add it. Yes, that's correct, I'm using php-fp

Re: [users@httpd] RewriteMap and patterns

2024-03-12 Thread Dave Wreski
On 3/11/24 4:42 PM, apmail-dferra...@apache.org wrote: On 09/03/2024 22:59, Dave Wreski wrote: Hi Eric, Might have to prefix with %{DOCUMENT_ROOT} I've tried variations of that, including the following, but no luck. They all fail with 400 or "invalid request" RewriteRule "/content/view/(

Re: [users@httpd] RewriteMap and patterns

2024-03-11 Thread apmail-dferradal
On 09/03/2024 22:59, Dave Wreski wrote: Hi Eric, Might have to prefix with %{DOCUMENT_ROOT} I've tried variations of that, including the following, but no luck. They all fail with 400 or "invalid request" RewriteRule "/content/view/(.*)" "${lsv2ids:$1}" RewriteRule "/content/view/(.*)" "%{

Re: [users@httpd] RewriteMap and patterns

2024-03-09 Thread Dave Wreski
Hi Eric, Might have to prefix with %{DOCUMENT_ROOT} I've tried variations of that, including the following, but no luck. They all fail with 400 or "invalid request" RewriteRule "/content/view/(.*)" "${lsv2ids:$1}" RewriteRule "/content/view/(.*)" "%{DOCUMENT_ROOT}${lsv2ids:$1}" [PT] Rewrite

Re: [users@httpd] RewriteMap and patterns

2024-03-09 Thread Eric Covener
Might have to prefix with %{DOCUMENT_ROOT} On Sat, Mar 9, 2024 at 11:48 AM Eric Covener wrote: > > Try without [PT]. > > On Sat, Mar 9, 2024 at 11:17 AM Dave Wreski > wrote: > > > > Hi, > > > > I think the issue is that mod_proxy uses r->filename (i.e. what non-PT > > rewrites put the substituti

Re: [users@httpd] RewriteMap and patterns

2024-03-09 Thread Eric Covener
Try without [PT]. On Sat, Mar 9, 2024 at 11:17 AM Dave Wreski wrote: > > Hi, > > I think the issue is that mod_proxy uses r->filename (i.e. what non-PT > rewrites put the substitution) to setup the proxy sub-modules when > using SetHandler to configure proxying. > > I'm not sure I understand what

Re: [users@httpd] RewriteMap and patterns

2024-03-09 Thread Dave Wreski
Hi, I think the issue is that mod_proxy uses r->filename (i.e. what non-PT rewrites put the substitution) to setup the proxy sub-modules when using SetHandler to configure proxying. I'm not sure I understand what that means - do you have a recommendation for how I should configure this instea

Re: [users@httpd] RewriteMap and patterns

2024-03-08 Thread Eric Covener
I think the issue is that mod_proxy uses r->filename (i.e. what non-PT rewrites put the substitution) to setup the proxy sub-modules when using SetHandler to configure proxying. On Fri, Mar 8, 2024 at 3:46 PM Dave Wreski wrote: > > Hi, > > What you have looks reasonable, PT should be URL-to-URL.

Re: [users@httpd] RewriteMap and patterns

2024-03-08 Thread Dave Wreski
Hi, What you have looks reasonable, PT should be URL-to-URL. You might try logging %f in your logformat. I've added %f and it just shows some of what looks like components from the 404 page, not the redirected page. What kind of handler is meant to handle these requests and how is it confi

Re: [users@httpd] RewriteMap and patterns

2024-03-07 Thread Eric Covener
What you have looks reasonable, PT should be URL-to-URL. You might try logging %f in your logformat. What kind of handler is meant to handle these requests and how is it configured? On Thu, Mar 7, 2024 at 10:24 AM Dave Wreski wrote: > > Hi, > > I'm trying to use RewriteMap on a few thousand olde

[users@httpd] RewriteMap and patterns

2024-03-07 Thread Dave Wreski
Hi, I'm trying to use RewriteMap on a few thousand older articles to map them to their modern equivalent. The pattern matches, but then the redirect doesn't occur. The examples and apache docs say I should be using [PT] to pass-through, but it results in a 404: [Thu Mar 07 09:56:47.696040 20