title: .htaccess rewrite not working on localhost (mac os x apache) -- FIXED
body: <p>I'm using the built-in Apache on my Mac OS X (Snow Leopard) to do local testing of my websites. Currently I'm trying to create clean URLs for my PHP website, but I just can't seem to get it working.</p>
  
  <p>Here's my .htaccess:</p>
  
  <pre><code>Options +FollowSymlinks
  RewriteEngine on
  RewriteBase /
  RewriteRule ^gallery/page/([A-Z0-9._%+-]+) gallery/index.php?page=$1 [NC]
  </code></pre>
  
  <p>I'd like to have it so that <strong>http://localhost/gallery/page/TITLE</strong> will automatically bring me to <strong>http://localhost/gallery/index.php?page=TITLE</strong></p>
  
  <p>My <strong>http://localhost/</strong> points to the local folder <strong>/Users/voltm/Sites/localhost/</strong> and the website I'm working on is in <strong>http://localhost/gallery/</strong> -- local folder <strong>/Users/voltm/Sites/localhost/gallery/</strong></p>
  
  <p>When I enter, for example, <strong>http://localhost/gallery/page/music</strong> in my browser, I get a 404 error <em>The requested URL /gallery/page/music was not found on this server</em>.</p>
  
  <p>I looked into the error log file and it says:</p>
  
  <pre><code>[Thu Apr 05 23:55:39 2012] [error] [client 127.0.0.1] File does not exist: /Users/voltm/Sites/localhost/gallery/page
  </code></pre>
  
  <p>I've checked on phpinfo() and httpd.conf to see that mod_rewrite is loaded.
  I've gone into httpd.conf and the conf file in the user folder to make the settings:</p>
  
  <pre><code>Options Indexes MultiViews FollowSymLinks
  AllowOverride All AuthConfig
  Order allow,deny
  Allow from all
  </code></pre>
  
  <p>And I've restarted Apache several times too.</p>
  
  <p>What am I missing?</p>
  
  <hr>
  
  <p>EDIT: Fixed! I had to remove the .htaccess file I had lying around in a subfolder.</p>