htaccess
This commit is contained in:
parent
1ad903e92c
commit
1e9e991876
50
.htaccess
50
.htaccess
|
|
@ -1,30 +1,30 @@
|
|||
## START OFFLINE.ResponsiveImages - webp-rewrite
|
||||
# DO NOT REMOVE THESE LINES
|
||||
#<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>
|
||||
<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>
|
||||
|
||||
## END OFFLINE.ResponsiveImages - webp-rewrite
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue