-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
37 lines (36 loc) · 1.67 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# BEGIN Converter for Media
# ! --- DO NOT EDIT PREVIOUS LINE --- !
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteOptions Inherit
RewriteCond %{HTTP_ACCEPT} image/avif
RewriteCond %{DOCUMENT_ROOT}/home/wp-content/uploads-webpc/$1.jpg.avif -f
RewriteRule (.+)\.jpg$ /home/wp-content/uploads-webpc/$1.jpg.avif [NC,T=image/avif,L]
RewriteCond %{HTTP_ACCEPT} image/avif
RewriteCond %{DOCUMENT_ROOT}/home/wp-content/uploads-webpc/$1.png.avif -f
RewriteRule (.+)\.png$ /home/wp-content/uploads-webpc/$1.png.avif [NC,T=image/avif,L]
RewriteCond %{HTTP_ACCEPT} image/avif
RewriteCond %{DOCUMENT_ROOT}/home/wp-content/uploads-webpc/$1.jpeg.avif -f
RewriteRule (.+)\.jpeg$ /home/wp-content/uploads-webpc/$1.jpeg.avif [NC,T=image/avif,L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteOptions Inherit
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{DOCUMENT_ROOT}/home/wp-content/uploads-webpc/$1.jpg.webp -f
RewriteRule (.+)\.jpg$ /home/wp-content/uploads-webpc/$1.jpg.webp [NC,T=image/webp,L]
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{DOCUMENT_ROOT}/home/wp-content/uploads-webpc/$1.png.webp -f
RewriteRule (.+)\.png$ /home/wp-content/uploads-webpc/$1.png.webp [NC,T=image/webp,L]
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{DOCUMENT_ROOT}/home/wp-content/uploads-webpc/$1.jpeg.webp -f
RewriteRule (.+)\.jpeg$ /home/wp-content/uploads-webpc/$1.jpeg.webp [NC,T=image/webp,L]
</IfModule>
<IfModule mod_headers.c>
<FilesMatch "(?i)\.(jpg|png|jpeg)(\.(webp|avif))?$">
Header always set Cache-Control "private"
Header append Vary "Accept"
</FilesMatch>
</IfModule>
# ! --- DO NOT EDIT NEXT LINE --- !
# END Converter for Media