There is one simple use for an .htaccess file that none of the books or online tutorials or references ever seem to tell you, and it is the one thing that I always find myself wanting to do.
Redirect from http://www.mywebsite.org to http://www.mywebsite.org/something/
Recently I have had to recreate from scratch a number of websites – sure the hosting company had full backups but theitr timescales were radically different from mine, so yes there is a website, but there sure as hell isn’t any content.
So like any good web person I reinstalled from my own backups, which for some unfathomable resaon had every file, execpt for the .htaccess files which I had to rewrite on the spot.
So here it is simple and effective, but so so elusive, type the following into a text editor, save the file as .htaccess and FTP it to the root of your website.
RewriteRule ^$ blog/
RewriteRule index.html$ blog/
RewriteRule index.php$ blog/
Enable cgi scripts outside of cgi-bin
This assumes that you do not have access to Apache httpd.conf file AND that the your setup allows you to override server settings with .htaccess . Again create and save an .htaccess file.
AddHandler cgi-script cgi pl
And the useful links that I have found on my travels