Added by cartpauj over 7 years ago
First I'll share the Apache Rules I'm trying to convert.
RewriteCond %{HTTP_COOKIE} cookiename=([a-zA-Z0-9]+) RewriteCond /var/www/site.com/temp-rules/%1 -f RewriteRule ^(.*)$ - [L]
The first condition checks for a cookie and regex's its value.
The second condition checks for a file with the same name as the value of the cookie
So I'm wondering if it's possible to convert this to a lighty equivalent?
Thanks!
You can apply arbitrary conditions and file tests, such as what you are trying to do above, with mod_magnet and a little bit of custom lua code (which you write). See AbsoLUAtion