I have looked on here and google and should not appear to obtain this right.

I've got a .htaccess file in root ... I would like all address to my website to visit a subdirectory (/foo.com/public_html/) and hang the baseDirectory.

/.htaccess
Options +FollowSymLinks
Options -MultiViews
RewriteEngine on
RewriteBase /foo.com/public_html/

rewritecond %{http_host} ^bar.com [nc]
rewriterule ^(.*)$ http://www.bar.com/$1 [r=301,nc]
rewriterule ^$ /foo.com/public_html/ [nc]

Performs this help:


RewriteEngine on

RewriteCond % ^yoursitename.com$

RewriteRule (.*) http://www.yoursitename.com/$1 [R=301,L]

RewriteRule ^$ yoursub-directoryname[L]