使用.htaccess为文件夹中的特定文件授予权限


give permissions to specific files inside a folder with .htaccess

我在专用服务器上安装了一个wordpress站点。我制作了一个脚本,将footer.php重命名为另一个文件名,如果我从浏览器中运行它,它就会正常工作。

所以我想通过plesk面板11的预定任务来完成,但我无法实现。我试图通过ssh运行它,但我得到了以下错误:

正在解析www.mywebpage.com.xxxx.xxx.xxx.xxx正在连接www.mywebpage.com|xxx.xxxx.xxxx|:80…已连接。HTTP请求已发送,正在等待响应。。。403禁止2013-11-25 18:53:11错误403:禁止。

所以我相信.htaccess正在阻止这个。有人能告诉我如何访问.htaccess中的特定文件夹和特定文件吗?

我试着用这个来查询时间表:wgethttp://www.mydomain.com/wp-content/themes/worldwide/rename.php

rename.php是:

<?php
rename("footer.php","footersecond.php");
rename("footernew.php","footer.php");
?>

为什么不从shell运行execute php脚本?使用类似的命令行创建cron任务

php http://www.mydomain.com/wp-content/themes/worldwide/rename.php