1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 01:54:12 +02:00

Fixes #1257 SEFURLs for thumb images. Needs testing. See e107.htaccess for required additions/modifications - Set HTTP_MOD_REWRITE_MEDIA to "On"

This commit is contained in:
Cameron
2016-02-03 18:17:14 -08:00
parent 84550d7390
commit b3bb493f69
3 changed files with 61 additions and 4 deletions

View File

@@ -41,6 +41,7 @@
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
SetEnv HTTP_MOD_REWRITE_MEDIA Off
</IfModule>
### enable rewrites
@@ -54,8 +55,14 @@
### Allow only GET and POST methods
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS|HEAD)
RewriteRule .* - [F]
### Rewrite for Image URLs
ReWriteRule ^media\/img\/(a)?([\d]*)x(a)?([\d]*)\/(.*)?$ thumb.php?src=e_MEDIA_IMAGE/$5&$1w=$2&$3h=$4 [NC,L]
RewriteRule ^media\/img\/([-A-Za-z0-9+/]*={0,3})\.(jpg|gif|png)?$ thumb.php?id=$1 [NC,L]
### send 404 on missing files in these folders
RewriteCond %{REQUEST_URI} !^/(e107_images|e107_files)/