I have a main domain like:
www.maindomain.com
On the hoster I have two folders in root:
/public_html/www/site1 and
/public_html/www/site2
What I'd like to accomplish is that if someone goes to www.site1.com it is redirected to the right place (www.maindomain.com/site1) but that he sees www.site1.com in the address bar. I'd like to accomplish the same for www.site2.com
Now I use the following .htaccess code:
- Code: Select all
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?site1\.com [NC]
RewriteRule (.*) http://www.maindomain.com/site1/$1 [R=301,L]
and that redirects the proper way i.e.:
www.site1.com --> http://www.maindomain.com/site1
but I'd like it to still show www.site1.com instead of http://www.maindomain.com/site1
Any help would be very appreciated. Thanks.