Server Signature off not working on .htaccess

谁都会走 提交于 2019-12-24 01:27:25

问题


I am working hardly to improve my website rank in SEO.I have done many and i have improved from C grade to B grade ,But from morning onwards i have been trying out 2 things .

  1.IP CANONICALIZATION 
  2.TURN OFF SERVER SIGNATURE

i have added the following to turn off the server signature to my .htaccess under public_html folder

 #Turn Off sserver signature
 ServerSignature Off

For Ip canonicalization ,thec code i have included to the .htaccess is

 RewriteCond %{HTTP_HOST} ^xxx\.xx\.xxx\.xxx [nc,or]
 RewriteCond %{HTTP_HOST} ^example\.com [nc]
 RewriteRule (.*) http://www.example.com/$1 [R=301,L]

both of them are not working as i have checked it through a SEO analyzing tool http://www.seositecheckup.com/ ,but another SEO analyzing tool http://www.woorank.com/ saying that both are working

Do any would say which one that can i trust ,what i am doing wrong in code


回答1:


According to the Apache ServerTokens is only for server config not .htaccess which means you can only change them via httpd.conf file.

Description:    Configures the Server HTTP response header
Syntax:         ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full
Default:        ServerTokens Full
Context:        server config
Status:         Core
Module:         core

Server Token



来源:https://stackoverflow.com/questions/20348862/server-signature-off-not-working-on-htaccess

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!