Keeping Drupal in a subdirectory under website root.

I don't like the idea of flooding your site root with all files found in Drupal's top level directory. If your site root is located at /usr/local/www/data/, then I'll place Drupal at /usr/local/www/data/cms or somewhere else in your filesystem. But I don't like the idea of accessing your site as www.example.com/cms either. mod_write solves all of these. So I place/add the following in the .htaccess file of a website's top level directory -

RewriteEngine On
RewriteRule ^(.*)$ cms/$1 [L]

Now whenever I access www.example.com, all my requests are served from www.example.com/cms without anybody noticing. The problem is, Drupal still thinks that it's living in www.example.com/cms and generates all links with "cms/". To get rid of it, open "sites/default/settings.php" and assign "http://www.example.com" as the value of the $base_url variable. This value can't have any trailing slashes. This will remove the last trail of "cms/" from the links. Now everybody will find everything under www.example.com and not www.example.com/cms .