Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何判断Apache是否按预期使用了我的.htaccess?_.htaccess_Robots.txt - Fatal编程技术网

如何判断Apache是否按预期使用了我的.htaccess?

如何判断Apache是否按预期使用了我的.htaccess?,.htaccess,robots.txt,.htaccess,Robots.txt,我想阻止谷歌在我的网站上索引pdf 根据谷歌网站管理员工具的建议,我已修改了.htaccess文件,以包含以下行: <Files ~ "\.pdf$"> Header set X-Robots-Tag "noindex, nofollow" </Files> 标题集X-Robots-Tag“noindex,nofollow” 我知道apache正在正常运行并读取我的.htaccess文件,因为我可以完全阻止对该文件的访问,但我无法判断上述命令是否有效

我想阻止谷歌在我的网站上索引pdf

根据谷歌网站管理员工具的建议,我已修改了.htaccess文件,以包含以下行:

<Files ~ "\.pdf$">   
    Header set X-Robots-Tag "noindex, nofollow" 
</Files>

标题集X-Robots-Tag“noindex,nofollow”
我知道apache正在正常运行并读取我的.htaccess文件,因为我可以完全阻止对该文件的访问,但我无法判断上述命令是否有效


谷歌网站管理员工具声称爬虫程序仍然可以看到PDF,但它们似乎只用于robots.txt。是否有第三方工具(适用于linux)可用于检查meta标记?

您可以在一些PDF上使用wget并查看标题:

wget -S http://host/something.pdf

谢谢,那正是我要找的国旗。