Make sure your file .htaccess is owned by the user running PHP. If you need to find out that user, you can upload a PHP file containing <?php echo exec('whoami'); ?>
and visit the page in your browser. Once you know the username, just use chown apache .htaccess
(assuming apache
is the username). Also make sure its permissions are 755: chmod 755 .htaccess
. If you do not know how to execute chown
/chmod
, some programs such as FileZilla will let you modify the owner and permissions of files via their graphic interface (usually through a right-click on the file and an option like “properties”)
Jeremy