protect single file in htaccess
You can protect a single file in htaccess using the following,
-- First create a file named ".htaccess" and add the following line of code,
AuthName "Only Admin Can Access"
-- Second, create a file named ".htpasswd" and add the username and password as,
Note: Use any password generator tool to create the htpasswd for eg, https://www.hscripts.com/tools/htpasswd/index.php