# &lt;IfModule mod\_deflate.c&gt; in .htaccess

**URL:** <https://forum.shopware.com/t/lt-ifmodule-mod-deflate-c-gt-in-htaccess/25075>\
**Category:** Shopware 3.5\
**Tags:** other\
**Created:** [13. Februar 2015 um 16:07 UTC](https://forum.shopware.com/t/lt-ifmodule-mod-deflate-c-gt-in-htaccess/25075 "2015-02-13T16:07:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ffinkelm](https://avatars.discourse-cdn.com/v4/letter/f/fbc32d/32.png) [@ffinkelm](https://forum.shopware.com/u/ffinkelm)\
**Post date:** [13. Februar 2015 um 16:07 UTC](https://forum.shopware.com/t/lt-ifmodule-mod-deflate-c-gt-in-htaccess/25075/1 "2015-02-13T16:07:14Z")

</div>

Hallo Community, ich wollte euch nur mal kurz mitteilen, dass der Eintrag # Enable gzip compression  
AddOutputFilterByType DEFLATE text/html text/xml text/plain text/css text/javascript application/json  
so nicht bei jedem Hoster zu funktionieren scheint. Bei meinem Anbieter (Alfahosting) muss es so eingetragen werden:  
  
SetOutputFilter DEFLATE  
  
Was genau ist der Unterschied, oder ist es egal, wie es geschrieben wird? Gruß

---

<div class="post-metadata">

**Author:** ![hth](https://avatars.discourse-cdn.com/v4/letter/h/b77776/32.png) [@hth](https://forum.shopware.com/u/hth)\
**Post date:** [13. Februar 2015 um 17:07 UTC](https://forum.shopware.com/t/lt-ifmodule-mod-deflate-c-gt-in-htaccess/25075/2 "2015-02-13T17:07:40Z")

</div>

[quote=„ffinkelm“]Hallo Community, ich wollte euch nur mal kurz mitteilen, dass der Eintrag # Enable gzip compression  
AddOutputFilterByType DEFLATE text/html text/xml text/plain text/css text/javascript application/json  
so nicht bei jedem Hoster zu funktionieren scheint. Bei meinem Anbieter (Alfahosting) muss es so eingetragen werden:  
  
SetOutputFilter DEFLATE  
  
Was genau ist der Unterschied, oder ist es egal, wie es geschrieben wird? Gruß[/quote] Die erste Version schaut nach dem Mime-Type, die zweite schaut stumpf nach der Endung hinter dem Punkt. Wenn eine Datei nicht mit dem korrekten Mime-Type ausgeliefert wird, kann man dies über die Dateiendung erzwingen. Daher kommt auch die häufige Fehlermeldung bei PagespeedInsight, dass die CSS-Dateien nicht mit GZ komprimiert seien. Die haben den falschen Mime-type und dann funktioniert es nicht. Die Shopware htaccess so ergänzen, sollte bei den meisten Hostern ausreichen: `# Enable gzip compression<ifmodule mod_deflate.c>
    AddType text/css .css
    AddType text/javascript .js
    AddOutputFilterByType DEFLATE text/html text/xml text/plain text/css text/javascript application/json
</ifmodule>`

---

<div class="post-metadata">

**Author:** ![ffinkelm](https://avatars.discourse-cdn.com/v4/letter/f/fbc32d/32.png) [@ffinkelm](https://forum.shopware.com/u/ffinkelm)\
**Post date:** [17. Februar 2015 um 10:02 UTC](https://forum.shopware.com/t/lt-ifmodule-mod-deflate-c-gt-in-htaccess/25075/3 "2015-02-17T10:02:47Z")

</div>

Javascript wird bei mir nicht gzip-ped, ist das normal? Gzip compression ist aktiv. Gruß

---

<div class="post-metadata">

**Author:** ![hth](https://avatars.discourse-cdn.com/v4/letter/h/b77776/32.png) [@hth](https://forum.shopware.com/u/hth)\
**Post date:** [17. Februar 2015 um 10:19 UTC](https://forum.shopware.com/t/lt-ifmodule-mod-deflate-c-gt-in-htaccess/25075/4 "2015-02-17T10:19:49Z")

</div>

Hallo, [quote=“ffinkelm”]Javascript wird bei mir nicht gzip-ped, ist das normal? Gzip compression ist aktiv. Gruß[/quote] wenn es um diese Seite geht, dann ist die Übertragung von JS- und CSS-Dateien mit gzip komprimiert. [http://www.lille-sted.de](http://www.lille-sted.de)

---

<div class="post-metadata">

**Author:** ![ffinkelm](https://avatars.discourse-cdn.com/v4/letter/f/fbc32d/32.png) [@ffinkelm](https://forum.shopware.com/u/ffinkelm)\
**Post date:** [19. Februar 2015 um 20:14 UTC](https://forum.shopware.com/t/lt-ifmodule-mod-deflate-c-gt-in-htaccess/25075/5 "2015-02-19T20:14:39Z")

</div>

Danke hth, scheinbar wieder ein Server Phänomen, oder aber der Eintrag in der .htaccess. Habe den Eintrag vor kurzem in der .htaccess noch mal geändert, diesmal scheint es richtig zu sein 🙂 Gruß
