• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

Resolved How to remove Cache-Control Use .htaccess?

v123shine

New Pleskian
Hi,

How to remove must-revalidate and max-age=0 from Cache-Control header using .htaccess?

And How to remove X-Powered-By PHP/5.6.24 using .htaccess?
I try using this code: Header unset X-Powered-By but still not work.

Can someone help me, please! Thanks

Note:
- I'm using Plesk 12.0.18
- PHP run as FastCGI
- Web Server Setting, using Smart static files processing with Serve static files directly by nginx.
 
Last edited:
Hi v123shine,

pls. be informed, that
How to remove must-revalidate and max-age=0 from Cache-Control header using .htaccess?
conflicts with the fact
- Web Server Setting, using Smart static files processing with Serve static files directly by nginx.
NGINX can't read ".htaccess" - files... you have to use "additional directives", when you use nginx.

Before giving additional suggestions to this question, can you pls. explain, why you would like to remove cache-control?


And How to remove X-Powered-By PHP/5.6.24 using .htaccess?
I try using this code: Header unset X-Powered-By but still not work.
To remove this information, consider to modify:

Code:
...
expose_php = off
...

at your depending PHP.ini - file(s).

Hint:
You could find it usefull, to use "sed", after you located your depending PHP.ini - file(s):

Examples:
Code:
find / -type f -name "*.ini" -exec grep -i -H "expose_php ="  {} \;
Code:
sed -i -e 's/expose_php = on/expose_php = off/' /etc/php/php.ini
 
Back
Top