title: How to remove /drupal from URL in Drupal 7 when installation is in the associated sub-directory
body: <p>In Drupal 6 I was able to successful install Drupal in a subdirectory called drupal and then reference the site without having to use example.com/drupal.
  In Drupal 6 to get this to work I did the following:
  - Created an .htaccess file in the root directory where /drupal was created. The file contents was:</p>
  
  <pre><code>Options -Indexes
  RewriteEngine On
  RewriteRule ^$ drupal/
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ drupal/$1
  </code></pre>
  
  <p>Updated the <code>drupal/sites/default/settings.php</code> file to have the $base_url defined as:
  <code>$base_url = 'http://example.com';</code></p>
  
  <p>When I try and do the same thing for Drupal 7, only the front page can be displayed, all the pages fail quite horribly (or only display the front page). I have also tried uncommenting the RewriteBase lines in /drupal/.htaccess. First I tried <code>RewriteBase /drupal</code> and then tried <code>RewriteBase /</code>. But both attempts failed. I never needed to do this with D6, but I thought I would rule out this possible fix.</p>
  
  <p>I am currently testing the new Drupal 7 install using xampp (version 1.7.4) with the example.com site under htdocs (i.e. xampp/htdocs/example.com/drupal). The Drupal 6 site is within the same xampp installation, but of course with a different directory path (e.g. xampp/htdocs/d6example.com/drupal). Note that I also have the Drupal 6 installation running on a production server with only the $base_url variable value changed.</p>
  
  <p>So, how can you install Drupal 7 in a subdirectory and then run it from that directory without having the directory name in the URL?
  Note I am installing Drupal 7 in a subdirectory as it allows for easier upgrading between new releases of the Drupal 7 core.</p>