title: How to protect subfolder which contain php page
body: <p>I have made a subdomain for my web-site which I will use to store all the important scripts, both php and javascript. I want to protect evertyhing there so that it cannot be accessed from a web-browse.</p>
  
  <p>I have tried .htpasswd. But when the page be called to do the function, there are password require every times.</p>
  
  <p>You can say that the folder can be protected, but it makes the script not work because access requires a password.</p>
  
  <p>Are there better alternatives?</p>