That’s right, some of the headers won’t work at all when using the PHP mode.
Some of the headers are intended for certain file types. For example the Expires header. If you setup such a header for “text/css” media files and your web server received a request for “main.css” it will return directly the file. PHP is not involved at all.
That’s why PHP mode is a bit limited, and will work only for generated content through PHP.
Also if you have installed some third-party caching plugin, most probably none of the headers will work. This is because the cache plugin will serve a static/cached content without headers, instead to ask your server for fresh content + headers.
When I use Apache mode, there is nothing working but I have an Apache server.
-
This reply was modified 5 years, 11 months ago by
solaack.
Check your httpd.conf for the following directive:
AllowOverride None
The above directive blocks any rule in your .htaccess.
Change it to:
AllowOverride All
Then restart Apache server.
Cannot find this file on my files. The host does not propose to access this file.
OK, then you should have an access to your .htaccess file. Can you answer this:
1. Is it writeable?
2. Is there any other rules that works?
3. Do you see the headers from settings there?
1. Yes
2. There are somes rules on Apache mod but don’t work.
3. Not all.
If you can’t find the headers configured with HTTP Headers plugin in .htaccess that may mean:
– plugin’s Apache mode is not active
– .htaccess file haven’t write permissions
– .htaccess file content is overwritten by other plugin
If all of the rules in .htaccess don’t work probably means that:
– AllowOverride directive have a value of None, if so you should contact your server admin
If some of the rules in .htaccess don’t work means that:
– specific module of Apache is not loaded, if so you should contact your server admin