Why ExpiresByType is ignored when has SetHandler application/x-httpd-php ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



בע"ה


Why ExpiresByType is ignored when has SetHandler application/x-httpd-php ?

/sitemap.xml Response Headers shows 1 day expiration while expected to be 1 year (1 month)

    Content-Type: application/xml; charset=utf-8
    Date:         Tue, 27 Dec 2016 19:59:00 GMT
    Expires:      Wed, 28 Dec 2016 19:59:00 GMT

seems SetHandler forces it to apply text/html expiration and doesn't allow to rewrite it

    ExpiresActive On
    ExpiresDefault                "access plus 1 month"
    ExpiresByType text/html       "access plus 1 day"
    ExpiresByType application/xml "access plus 1 week"

    <FilesMatch ^sitemap\.xml$>
        SetHandler application/x-httpd-php
        Header set Content-Type "application/xml"
        ExpiresDefault "access plus 1 year"
    </FilesMatch>

tested on Apache 2.4.X builds.

How to fix this issue?



Binyamin

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux