2021-04-08 12:38:39 +00:00
|
|
|
## START OFFLINE.ResponsiveImages - webp-rewrite
|
|
|
|
|
# DO NOT REMOVE THESE LINES
|
2021-04-15 10:47:11 +00:00
|
|
|
<IfModule mod_setenvif.c>
|
|
|
|
|
# Vary: Accept for all the requests to jpeg and png
|
|
|
|
|
SetEnvIf Request_URI "\.(jpe?g|png)$" REQUEST_image
|
|
|
|
|
</IfModule>
|
|
|
|
|
<ifModule mod_rewrite.c>
|
|
|
|
|
RewriteEngine On
|
|
|
|
|
|
|
|
|
|
# If the Browser supports WebP images, and the .webp file exists, use it.
|
|
|
|
|
RewriteCond %{HTTP_ACCEPT} image/webp
|
|
|
|
|
RewriteCond %{REQUEST_URI} ^/?storage/.*\.(jpe?g|png)
|
|
|
|
|
RewriteCond %{REQUEST_FILENAME}.webp -f
|
|
|
|
|
RewriteRule ^/?(.*)$ $1.webp [NC,T=image/webp,END]
|
|
|
|
|
|
|
|
|
|
# If the Browser supports WebP images, and the .webp file does not exist, generate it.
|
|
|
|
|
RewriteCond %{HTTP_ACCEPT} image/webp
|
|
|
|
|
RewriteCond %{REQUEST_URI} ^/?storage/.*\.(jpe?g|png)
|
|
|
|
|
RewriteCond %{REQUEST_FILENAME}\.webp !-f
|
|
|
|
|
RewriteRule ^/?(.*)$ plugins/offline/responsiveimages/webp.php?path=$1 [NC,END]
|
|
|
|
|
</ifModule>
|
|
|
|
|
<IfModule mod_headers.c>
|
|
|
|
|
Header append Vary Accept env=REQUEST_image
|
|
|
|
|
</IfModule>
|
|
|
|
|
<IfModule mod_mime.c>
|
|
|
|
|
AddType image/webp .webp
|
|
|
|
|
</IfModule>
|
2021-04-08 12:38:39 +00:00
|
|
|
|
|
|
|
|
## END OFFLINE.ResponsiveImages - webp-rewrite
|
|
|
|
|
|
2014-05-14 13:21:55 +00:00
|
|
|
<IfModule mod_rewrite.c>
|
2015-06-10 12:11:29 +00:00
|
|
|
|
2014-05-14 13:21:55 +00:00
|
|
|
<IfModule mod_negotiation.c>
|
|
|
|
|
Options -MultiViews
|
|
|
|
|
</IfModule>
|
|
|
|
|
|
|
|
|
|
RewriteEngine On
|
2014-05-16 00:01:50 +00:00
|
|
|
|
|
|
|
|
##
|
|
|
|
|
## You may need to uncomment the following line for some hosting environments,
|
|
|
|
|
## if you have installed to a subdirectory, enter the name here also.
|
|
|
|
|
##
|
|
|
|
|
# RewriteBase /
|
2020-08-22 02:46:12 +00:00
|
|
|
|
2018-01-09 23:53:17 +00:00
|
|
|
##
|
|
|
|
|
## Uncomment following lines to force HTTPS.
|
|
|
|
|
##
|
|
|
|
|
# RewriteCond %{HTTPS} off
|
2020-03-27 18:14:51 +00:00
|
|
|
# RewriteRule (.*) https://%{SERVER_NAME}/$1 [L,R=301]
|
2014-05-14 13:21:55 +00:00
|
|
|
|
|
|
|
|
##
|
2016-06-16 21:09:14 +00:00
|
|
|
## Black listed folders
|
2014-05-14 13:21:55 +00:00
|
|
|
##
|
2015-02-20 11:11:42 +00:00
|
|
|
RewriteRule ^bootstrap/.* index.php [L,NC]
|
|
|
|
|
RewriteRule ^config/.* index.php [L,NC]
|
|
|
|
|
RewriteRule ^vendor/.* index.php [L,NC]
|
|
|
|
|
RewriteRule ^storage/cms/.* index.php [L,NC]
|
|
|
|
|
RewriteRule ^storage/logs/.* index.php [L,NC]
|
|
|
|
|
RewriteRule ^storage/framework/.* index.php [L,NC]
|
2015-04-25 01:22:34 +00:00
|
|
|
RewriteRule ^storage/temp/protected/.* index.php [L,NC]
|
|
|
|
|
RewriteRule ^storage/app/uploads/protected/.* index.php [L,NC]
|
2014-05-14 13:21:55 +00:00
|
|
|
|
|
|
|
|
##
|
2016-06-16 21:09:14 +00:00
|
|
|
## White listed folders
|
2014-05-14 13:21:55 +00:00
|
|
|
##
|
|
|
|
|
RewriteCond %{REQUEST_FILENAME} -f
|
2016-11-12 02:29:10 +00:00
|
|
|
RewriteCond %{REQUEST_FILENAME} !/.well-known/*
|
2020-09-06 19:36:28 +00:00
|
|
|
RewriteCond %{REQUEST_FILENAME} !/storage/app/uploads/public/.*
|
2016-06-16 21:09:14 +00:00
|
|
|
RewriteCond %{REQUEST_FILENAME} !/storage/app/media/.*
|
2020-09-06 19:36:28 +00:00
|
|
|
RewriteCond %{REQUEST_FILENAME} !/storage/app/resized/.*
|
2016-06-16 21:09:14 +00:00
|
|
|
RewriteCond %{REQUEST_FILENAME} !/storage/temp/public/.*
|
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !/themes/.*/(assets|resources)/.*
|
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !/plugins/.*/(assets|resources)/.*
|
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !/modules/.*/(assets|resources)/.*
|
|
|
|
|
RewriteRule !^index.php index.php [L,NC]
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
|
## Block all PHP files, except index
|
|
|
|
|
##
|
|
|
|
|
RewriteCond %{REQUEST_FILENAME} -f
|
|
|
|
|
RewriteCond %{REQUEST_FILENAME} \.php$
|
|
|
|
|
RewriteRule !^index.php index.php [L,NC]
|
2014-05-14 13:21:55 +00:00
|
|
|
|
|
|
|
|
##
|
|
|
|
|
## Standard routes
|
|
|
|
|
##
|
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
|
RewriteRule ^ index.php [L]
|
|
|
|
|
|
|
|
|
|
</IfModule>
|