title: .htaccess mod_rewrite for web service as well as hide other files
body: <p>I think I know how to hide the files but how do I use mod_rewrite to allow only the web service to be called in the same directory?</p>
  
  <p>Here is the directory/file structure</p>
  
  <pre><code>/var/www/html/xmlrpc/xmlrpc.server.php
  /var/www/html/xmlrpc/xmlrpc.client.php
  /var/www/html/xmlrpc/xmlrpc.class.php
  /var/www/html/xmlrpc/xmlrpc.ini
  /var/www/html/xmlrpc/logs
  </code></pre>
  
  <p>Important note: /var/www/html/xmlrpc/logs has 777 permission 
  before you start harping on me I plan to move this into a non public directory and give the correct permissions. But I was asked to see if I could hide it with the .htaccess file.</p>
  
  <p>.htaccess</p>
  
  <pre><code>AuthType Basic
  AuthName "My hidden files"
  AuthBasicProvider file
  AuthUserFile /var/www/html/xmlrpc/.pswds
  Require valid-user
  </code></pre>
  
  <p>.pswds</p>
  
  <pre><code>user:5/abcde1abcdE
  </code></pre>
  
  <p>Also I'm a newbie with mod_rewite/mod_alias and need this URL:</p>
  
  <pre><code>http://127.0.0.1/xmlrpc/xmlrpc.server.php
  </code></pre>
  
  <p>to be this:</p>
  
  <pre><code>http://127.0.0.1/xmlrpc/v1/
  </code></pre>
  
  <p>How does one do this? </p>
  
  <p>Also on know on the virtual host setup in Apache you can set the log file paths/names, can this be done from the .htaccess file as well?</p>
  
  <p>Examples are welcome as this is a learning experience for me as well.</p>