title: password protect a single file using .htaccess
body: <p>I have tried to password protect a single file using .htaccess. But when accessing the file the browser just redirects to the home page of the website. I have my .htpasswd on my webroot. My .htaccess file is given below</p>
  
  <pre><code>    &lt;FilesMatch "result.php"&gt;
      AuthName "Member Only"
      AuthType Basic
      AuthUserFile /home/username/.htpasswd
      require valid-user
      &lt;/FilesMatch&gt;
  </code></pre>
  
  <p>I want to protect the file result.php. I have replaced username with my exact cpanel username. Someone please help</p>