If you’ve ever needed to host your files for a site in a subfolder such as “public_html/mysubfolder/” as if it were “public_html/” so that your URL displayed is (for example) “http://www.epiphanydigital.com/” instead of “http://www.epiphanydigital.com/mysubfolder”, then you may want to try something like the following htaccess black magic:
RewriteEngine On
RewriteRule ^$ /mysubfolder/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/mysubfolder/
RewriteRule ^(.*)$ /mysubfolder/$1
RewriteCond %{SCRIPT_FILENAME} -d
RewriteRule ^epiphanydigital.com/(.*[^/])$ http://www.epiphanydigital.com/$1/ [R=301]
Now, a better way is to just modify your VirtualHost record directory on a site by site basis, but if you’re like me and you’re on a shared host, you just don’t have access to do this. An .htaccess rewrite rule will cost slightly more overhead than a VirtualHost record.