how to execute htaccess password protected file through cron

If you have a file which is protected through htaccess password and you want to execute this file through crontab, you have to pass the username and password with the url like below

http://username:password@mydomain.com/secured/cron.php

Then, it would works. This can be done in another way by allow this single file accessible to all. To do that update your .htaccess file insde that folder. Just add something like below

<Files “cron.php”>
Allow from All
Satisfy Any
</Files>

That’s it.

Advertisements
This entry was posted in Uncategorized and tagged . Bookmark the permalink.

2 thoughts on “how to execute htaccess password protected file through cron

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s