简体   繁体   中英

give permissions to specific files inside a folder with .htaccess

I have installed a wordpress site to my dedicated server. I made a script that will rename the footer.php to another filename and if i run it from my browser it works correctly.

So i want to do it via scheduled task from plesk panel 11 but i cannot achieve it. I tried to run it through ssh but i got the following errors:

Resolving www. mywebpage.com.. xxx.xxx.xxx.xxx Connecting to www.mywebpage.com|xxx.xxx.xxx.xxx|:80... connected. HTTP request sent, awaiting response... 403 Forbidden 2013-11-25 18:53:11 ERROR 403: Forbidden.

So i believe that .htaccess is blocking this. Can anyone tell me how to give access to specific folder and specific files inside .htaccess?

i tried this to plesk schedule: wget http://www.mydomain.com/wp-content/themes/worldwide/rename.php

And the rename.php is:

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

Why not to run execute php script from shell? Create cron task with command line like

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM