[users@httpd] Re:

2022-12-11 Thread BohwaZ
OK actually that didn't work :( I'm doing this: SetEnvIfExpr "%{REQUEST_URI} =~ /^(.+)(?:\?|$)/" CACHE_URI=$1 SetEnvIfExpr "md5(%{ENV:CACHE_URI}) =~ /^(.+)$/" CACHE_MD5_URI=$1 Then: When doing a strace I can see that Apache is doing a stat on /home/bohwaz/cach

[users@httpd] Re:

2022-12-10 Thread BohwaZ
Thank you Eric! With your help I figured it out: SetEnvIfExpr "'%{DOCUMENT_ROOT}/cache/%{md5:REQUEST_URI}.html' =~ /(.+)/" CACHE_PATH=$0 then use it in and RewriteRule, or: RewriteCond expr "%{md5:REQUEST_URI} =~ /(.+)/" RewriteRule .* "%{DOCUMENT_ROOT}/cache/%0.html" Awesome :) -

Re: [users@httpd] RewriteRule and md5 (or expressions)

2022-12-10 Thread BohwaZ
Thank you, yes it was also what I thought, but RewriteMap is not available in .htaccess, and this is for an app that is mostly used on mass hosting providers, with no access to the server config. - To unsubscribe, e-mail: users-un

[users@httpd] RewriteRule and md5 (or expressions)

2022-12-09 Thread BohwaZ
Hi everyone, I'm wondering if it's possible to rewrite the current URL to a MD5 hash of the request URL. What I'm trying to do is serve "/cache/[MD5 hash of URL].html" when a request on "/URL" is done. This is for caching dynamic content: if the MD5 hash file exists, then serve the static file, i