Merge branch 'develop' into trunk

This commit is contained in:
Noah Lancien 2025-05-22 09:34:32 +02:00
commit c0cfc4d69a
3 changed files with 14 additions and 12 deletions

View file

@ -18,9 +18,9 @@
# - Document root availablity: Available and its "realpath" is available too. Can be used for structuring cache dir.
#
# .htaccess capability test results:
# - mod_header working?: yes
# - mod_header working?: could not be determined
# - pass variable from .htaccess to script through header working?: no
# - pass variable from .htaccess to script through environment variable working?: yes
# - pass variable from .htaccess to script through environment variable working?: could not be determined
#
# Role of the dir that this .htaccess is located in:
# - Is this .htaccess in a dir containing source images?: yes
@ -69,7 +69,7 @@
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} (?i)(.*)(\.jpe?g|\.png)$
RewriteRule (?i).*$ /app/mu-plugins/webp-express/wod/webp-on-demand.php [E=WE_WP_CONTENT_REL_TO_WE_PLUGIN_DIR:../../,E=WE_SOURCE_REL_HTACCESS:$0,E=WE_HTACCESS_ID:themes,NC,L]
RewriteRule (?i).*$ /app/mu-plugins/webp-express/wod2/webp-on-demand.php?xwp-content-rel-to-we-plugin-dir=x../../&xsource-rel-htaccess=x$0&htaccess-id=themes [E=WE_WP_CONTENT_REL_TO_WE_PLUGIN_DIR:../../,E=WE_SOURCE_REL_HTACCESS:$0,E=WE_HTACCESS_ID:themes,NC,L]
# Make sure that browsers which does not support webp also gets the Vary:Accept header
# when requesting images that would be redirected to webp on browsers that does.

View file

@ -18,9 +18,9 @@
# - Document root availablity: Available and its "realpath" is available too. Can be used for structuring cache dir.
#
# .htaccess capability test results:
# - mod_header working?: yes
# - mod_header working?: could not be determined
# - pass variable from .htaccess to script through header working?: no
# - pass variable from .htaccess to script through environment variable working?: yes
# - pass variable from .htaccess to script through environment variable working?: could not be determined
#
# Role of the dir that this .htaccess is located in:
# - Is this .htaccess in a dir containing source images?: yes
@ -69,7 +69,7 @@
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} (?i)(.*)(\.jpe?g|\.png)$
RewriteRule (?i).*$ /app/mu-plugins/webp-express/wod/webp-on-demand.php [E=WE_WP_CONTENT_REL_TO_WE_PLUGIN_DIR:../../,E=WE_SOURCE_REL_HTACCESS:$0,E=WE_HTACCESS_ID:uploads,NC,L]
RewriteRule (?i).*$ /app/mu-plugins/webp-express/wod2/webp-on-demand.php?xwp-content-rel-to-we-plugin-dir=x../../&xsource-rel-htaccess=x$0&htaccess-id=uploads [E=WE_WP_CONTENT_REL_TO_WE_PLUGIN_DIR:../../,E=WE_SOURCE_REL_HTACCESS:$0,E=WE_HTACCESS_ID:uploads,NC,L]
# Make sure that browsers which does not support webp also gets the Vary:Accept header
# when requesting images that would be redirected to webp on browsers that does.

View file

@ -18,9 +18,9 @@
# - Document root availablity: Available and its "realpath" is available too. Can be used for structuring cache dir.
#
# .htaccess capability test results:
# - mod_header working?: yes
# - mod_header working?: could not be determined
# - pass variable from .htaccess to script through header working?: no
# - pass variable from .htaccess to script through environment variable working?: yes
# - pass variable from .htaccess to script through environment variable working?: could not be determined
#
# Role of the dir that this .htaccess is located in:
# - Is this .htaccess in a dir containing source images?: no
@ -30,12 +30,12 @@
# Rules for handling requests for webp images
# ---------------------------------------------
# WebP Realizer: Redirect non-existing webp images to webp-realizer.php, which will locate corresponding jpg/png,
# WebP Realizer: Redirect non-existing webp images to webp-realizer.php, which will locate corresponding jpg/png,
# convert it, and deliver the freshly converted webp
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (?i).*(\.jpe?g|\.png)\.webp$ /app/mu-plugins/webp-express/wod/webp-realizer.php [E=WE_WP_CONTENT_REL_TO_WE_PLUGIN_DIR:../../,E=WE_DESTINATION_REL_HTACCESS:$0,E=WE_HTACCESS_ID:cache,NC,L]
RewriteRule (?i).*(\.jpe?g|\.png)\.webp$ /app/mu-plugins/webp-express/wod2/webp-realizer.php?xwp-content-rel-to-we-plugin-dir=x../../&xdestination-rel-htaccess=x$0&htaccess-id=cache [E=WE_WP_CONTENT_REL_TO_WE_PLUGIN_DIR:../../,E=WE_DESTINATION_REL_HTACCESS:$0,E=WE_HTACCESS_ID:cache,NC,L]
</IfModule>
# Set Vary:Accept header if we came here by way of our redirect, which set the ADDVARY environment variable
@ -54,7 +54,9 @@
</IfModule>
</IfModule>
# Register webp mime type
# Register webp mime type
<IfModule mod_mime.c>
AddType image/webp .webp
</IfModule>
</IfModule>
# END WebP Express