plan2net / webp

Create a WebP copy for images (TYPO3 CMS)
GNU General Public License v3.0
60 stars 34 forks source link

Clearification .htaccess adoptions and default .htaccess #32

Closed josefglatz closed 4 years ago

josefglatz commented 4 years ago

Do I understand it correct, that you suggest to remove every other already existing webp related occurence in TYPO3's default .htaccess? reference: https://github.com/plan2net/webp#apache-htaccess-example


L144

ExpiresByType image/webp "access plus 1 month"


L196

AddType image/webp webp


L238

# Send the CORS header for images when browsers request it.
<IfModule mod_setenvif.c>
    <IfModule mod_headers.c>
        <FilesMatch "\.(bmp|cur|gif|ico|jpe?g|png|svgz?|webp)$">
            SetEnvIf Origin ":" IS_CORS
            Header set Access-Control-Allow-Origin "*" env=IS_CORS
        </FilesMatch>
    </IfModule>
</IfModule>

>>


L350

<IfModule mod_headers.c>
    # Force IE to render pages in the highest available mode
    Header set X-UA-Compatible "IE=edge"
    <FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svgz?|ttf|vcf|webapp|webm|webp|woff2?|xml|xpi)$">
        Header unset X-UA-Compatible
    </FilesMatch>

    # Reducing MIME type security risks
    Header set X-Content-Type-Options "nosniff"
</IfModule>

>>


Maybe it is possible to recommend the place of the new snippet in an default TYPO3 .htaccess and make infos more clear about existing webp "rules" in default TYPO3 .htaccess file.

wazum commented 4 years ago

No, I don't suggest that! I only suggest to be careful not to add other rules that interfere with the given rules. hth

dpomykanov commented 3 years ago

@wazum So what are the recommended positions for the snippets?

In my case it does not work anywhere I place it inside of the htaccess) :/

Maybe someone can help me?