A simple solution to just password protect 1 single file... password protect the entire directory of the directory that contains the file...
In that directory, open up the file called ".htaccess"
It should have code that looks like
Code:
AuthType basic
AuthName "This directory is protected"
AuthUserFile /home/path/.htpasswd <- this will be different for you
AuthGroupFile /dev/null
Require valid-user
It needs to look like this
Code:
<Files secure.php>
AuthType Basic
AuthName "Prompt"
AuthUserFile /home/path/.htpasswd
Require valid-user
</Files>
Change the blue code to the exact name of the file
Move the code in green from your original code in the .htaccess file to the code I gave you for the single file
I hope that made sense