I have a main site which is hosted in a unix virtual host plan with unlimited domains. I have created another website in a sub-folder inside the public_html and created the appropriate dns forwarding in the host control panel and registrar.
the website works fine and is reachable.
in order the display the "correct" URL I've used a mod_rewrite in the htaccess :
- Code: Select all
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?sub_domain\.com
RewriteRule .* - [L]
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^main_domain\.com
RewriteRule (.*) http://main_domain.com/$1 [R=301,L]
as I wrote - it works fine in the users end - but google did not index the site inside the sub folder.
what am I doing wrong ?
thanks in advance