1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Closes #2596 - Enhancement to remove query strings from static resources.

This commit is contained in:
Cameron
2017-04-26 13:58:01 -07:00
parent 252abfdce6
commit 2724127ba2
3 changed files with 64 additions and 4 deletions

View File

@@ -42,6 +42,7 @@
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
SetEnv HTTP_MOD_REWRITE_MEDIA On
SetEnv HTTP_MOD_REWRITE_STATIC On
</IfModule>
### enable rewrites
@@ -65,6 +66,9 @@
RewriteRule ^media\/img\/([-A-Za-z0-9+/]*={0,3})\.(jpg|gif|png)?$ thumb.php?id=$1 [NC,L]
ReWriteRule ^theme\/img\/(a)?([\d]*)x(a)?([\d]*)\/(.*)?$ thumb.php?src=e_THEME/$5&$1w=$2&$3h=$4 [NC,L]
### Rewrite for Static Scripts
ReWriteRule ^static\/[0-9]*\/(.*)$ $1 [NC,L]
### send 404 on missing files in these folders
RewriteCond %{REQUEST_URI} !^/(e107_images|e107_files)/
@@ -99,6 +103,12 @@
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/xml text/xml application/rss+xml
</ifmodule>
<FilesMatch "\.(js|css|ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4)$">
Header set Cache-Control "public"
Header unset Cookie
Header unset Set-Cookie
</FilesMatch>
### Enable when developing locally.
### SetEnv E_DEV true