php - html2pdf : 防止谷歌机器人抓取
问题描述
我使用以下脚本:
https://www.html2pdf.fr/en/home
该脚本将我的 php 文件转换为 pdf 文件。
例如 url:mywebsite.com/pdf/url.php?id=8 将生成一个 PDF 文件。另一个例子:https ://github.com/spipu/html2pdf/blob/master/examples/example01.php
我不希望谷歌机器人索引这些页面。
我在我的 htaccess 文件中添加了以下代码,但它不会阻止谷歌抓取页面,因为它是在 PHP 中:#Block indexing of Word and PDF files <files ~ ".(doc|docx|pdf)$"> Header Set X-Robots-Tag "noindex, nofollow
我无法阻止它,我该怎么做?
解决方案
推荐阅读
- python - 如何通过以元组为参数的函数比较两个变量?
- asp.net - Excel下载未从服务器发生
- dicom - 使用 DCMTK 读取 DICOM 文件的内容序列标签时出现问题
- python - 如何在列出的特定时间运行代码
- python - Django 导出 CSV 给出 HttpResponse 错误
- r - 使用 R 处理一个简单的文本序列以提取所需的输出 nx 1 数据帧
- netty - 如何通过 DTLS 发送数据?
- apache-kafka - logstash kafka 的输出
- javascript - D3 基本地图轮廓未显示
- spring-boot - Undertow 访问日志跳过时间 (%D)