3

Our webhoster moved the site to a newer server and now i have the problem that i have ETags everywhere.

I tried FileETag None in the htaccess but that does not work. They told me on the phone that the ETags are not coming from Apache and that it is from the new php and that i have to disable them there.

Put i can't find something about php 5 is sending ETags per standard and can't find a setting to disable it in php.ini.

Does somebody know where to disable ETags in php?

2
  • Ok, it was a misunderstanding on the phone with the guy from the support. Looks like he never heart of eTags before. But that does not change a thing cause you can't disable it on there server. Jun 24, 2011 at 17:24
  • 3
    PHP can't remove headers it doesn't set. And ETags are generally set by the web server, not PHP.
    – timw4mail
    Jun 28, 2011 at 18:20

2 Answers 2

2

Try the following in your .htaccess:

Header unset ETag
FileETag None
0

This explains how to disable ETags via .htaccess for your Apache-powered website:

# Disable ETags
<IfModule mod_headers.c>
    Header unset ETag
</IfModule>
FileETag None

Reference: Disable ETags

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.