Home how to use rewrite, if first rewrite doesn't yield a result (search in different locations)
Reply: 0

how to use rewrite, if first rewrite doesn't yield a result (search in different locations)

user600
1#
user600 Published in June 19, 2018, 6:28 pm

I use the following rewrite rule to retrieve files from a different directory and it works nicely:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^((ffmpeg|ffprobe|ffserver|ffplay)-[0-9]+-g[0-9a-z]+\.(?:7z|dmg))$  /pub/$2/snapshots/$1  [L]

However, only 30 files are kept in /pub/$2/snapshots/$1 and older files are moved to a different "archive" directory (e.g. /pub/archive/$1).

Is there a way to rewrite to /pub/archive/$1, if the file isn't available in /pub/$2/snapshots/$1 anymore?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.400945 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO