Mod rewrite
From Hostek.com Wiki
General Information
Mod rewrite is available on our Linux servers and can be used to rewrite or redirect your site to a particular URL.
Redirecting to a Sub Folder
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
RewriteRule ^$ testdirectory [L]
HTTP to HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}