如何从 WordPress 安装中删除 serverSignature

发布于 2024-10-01 21:06:55 字数 351 浏览 1 评论 0原文

我正在尝试从 WordPress 博客中删除服务器签名。我在 .htaccess 中使用此设置:

ServerSignature Off

但我看到 X-Powered-By 已经消失,而不是此 ServerSignature:

*Server: Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough /2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.30*

我正在 .htaccess 文件的根公共文件夹中设置值。

I am trying to remove server Signature from Wordpress blog. I am using this setting for .htaccess:

ServerSignature Off

but I see X-Powered-By has gone and not this ServerSignature:

*Server: Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.30*

I am setting the value in root public folder of .htaccess file.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

囍孤女 2024-10-08 21:06:55

[迟做总比不做好 LOL]

根据各种来源,无法删除某些标头是 Apache 的设计问题,例如 在 Apache2 中删除 http 标头

单独通过 Apache(据我所知)的最佳想法是将其添加到 httpd.conf 或 apache.conf 文件(而不是 . htaccess):

ServerTokens Prod

因此在标题中它将显示类似:

Server: Apache

而不是完整的:

Server: Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.30

[Better late than never LOL]

According to various sources, the inability to remove certain headers is design issue of Apache e.g. Removing http headers in Apache2

The best idea through Apache alone (as far as I'm aware) is to suppress how much information is given by adding this to your httpd.conf or apache.conf files (not .htaccess):

ServerTokens Prod

So in the header it will show something like:

Server: Apache

instead of your full:

Server: Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.30
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文