Question : I need site to redirect to subfolder but only when domain is typed

i have website installed on a subdirectory of a root domain.

www.domain.com needs to point to www.domain.com/sub

BUT if someone types in www.domain.com/differentsubname  i need that to work as well.

My current .htaccess file.

what can i do to make this more specific?
Code Snippet:
1:
2:
3:
4:
5:
RewriteEngine on
 
RewriteCond %{HTTP_HOST} ^benrobbins.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.benrobbins.com$
RewriteRule ^.*$ "http\:\/\/www\.benrobbins.com\/br" [R=301,L]

Answer : I need site to redirect to subfolder but only when domain is typed

> So just confirming, if i type in www.benrobbins.com  it will forward to /br.  but if i type in benrobbins.com/anythingelse it will go to /anythingelse rather then just auto forwarding back to /br?

correct.
Random Solutions  
 
programming4us programming4us