Skip to content

Instantly share code, notes, and snippets.

@roboter
Created October 3, 2013 09:26
Show Gist options
  • Save roboter/6807480 to your computer and use it in GitHub Desktop.
Save roboter/6807480 to your computer and use it in GitHub Desktop.
check if image in cache
RewriteEngine on
#check if image is in cache
RewriteCond %{REQUEST_METHOD} ^GET$
RewriteCond %{REQUEST_URI} ^/img/(.+)$ #just for images
RewriteCond %{DOCUMENT_ROOT}/cache/%{REQUEST_URI} -f
RewriteRule ^(.+)+$ cache/$1 [L,QSA]
# SLIM Framework
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment