title: Deny access to php files but allow some other php files in subdirectory
body: <p>I have a directory named "template". There are some php files that I don't want people have direct access to them, So I wrote this in htaccess :</p>
  
  <pre><code>&lt;Files *.php&gt;
      Order Deny,Allow
      Deny from all
  &lt;/Files&gt;
  </code></pre>
  
  <p>Also there is some files that I want people have direct access to them, these files are named as: </p>
  
  <blockquote>
    <p>switcher.php, switcher1.php, switcher2.php, switcher3.php, switcher4.php, switcher5.php</p>
  </blockquote>
  
  <p>And located at <code>template/styles/theme/</code></p>
  
  <p>So I created a new htaccess file in that location and wrote this :</p>
  
  <pre><code>&lt;FilesMatch "^switcher[1-5]?\.php$"&gt;
      Order Allow,Deny
      Allow from all
  &lt;/FilesMatch&gt;
  </code></pre>
  
  <p>This works good on my localhost, but when I upload the script on a cPanel Shared Host, it didn't work there. Access to all php files denied.</p>
  
  <p>What can I do to fix this problem?</p>
  
  <p>I can't ask hosting to make changes, because this script should installed on at least 30 shared hosts with different configurations!</p>