限制带有 .htaccess 的文件夹会阻碍内部服务器 cron 作业对该文件夹中的 php 文件的访问


Will restricting a folder with .htaccess hinder internal server cron job access to a php file within that folder?

我有一个GoDaddy服务器,我有一个每天运行一次php脚本的Cron作业设置。 我想限制公众对此脚本的访问。 通过 .htaccess 限制脚本所在的文件夹是否会妨碍我的服务器使用 cron 作业运行脚本的内部能力?

.htaccess由Web服务器(例如Apache)处理。Cron 作业是独立于您的 htaccess 的计划任务。所以不它不会阻碍。

只需确保脚本权限正常即可。