google not indexing a site hoseted inside folder

Using a single web hosting account to host multiple sites

google not indexing a site hoseted inside folder

Postby Shakty » Sun Dec 14, 2008 3:48 am

hello to all kind ppl :)

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
Shakty
 
Posts: 9
Joined: Sun Dec 14, 2008 3:19 am

Postby richardk » Sun Dec 14, 2008 7:09 am

What is your directory structure?
Where do the domains go if there is no mod_rewrite?
Where is the .htaccess file containing that mod_rewrite?
Do you have any other mod_rewrite?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

thanks richard

Postby Shakty » Sun Dec 14, 2008 9:06 am

the main site is on the root of the public_html
the seconf site is a folder under the root - there is only 1 htaccess which is located in the root - here' is all the code of the htaccess :

aaaa - main domain on root
bbbb - second domain in sub-folder

Code: Select all
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?bbbb\.com
RewriteRule .* - [L]
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^aaaa\.com
RewriteRule (.*) http://iconsult.co.il/$1 [R=301,L]


RewriteEngine On
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]


thanks
Shakty
 
Posts: 9
Joined: Sun Dec 14, 2008 3:19 am

Postby richardk » Mon Dec 15, 2008 8:36 am

Do you have any reason why you think mod_rewrite is causing this? I don't see any reason why it would.

Cleaned up a little
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?exampleb\.com$ [NC]
RewriteRule .* - [L]

RewriteCond %{HTTP_HOST} !^examplea\.com$ [NC]
RewriteRule ^(.*)$ http://examplea.com/$1 [R=301,L]

RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [NC,OR]
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [NC,OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [NC,OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) [NC]
RewriteRule .* - [F,L]

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index\.php$
RewriteRule (/|\.php|\.html?|\.feed|\.pdf|\.raw|/[^.]*)$ index.php [NC,QSA]

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

10x for the cleanup

Postby Shakty » Tue Dec 16, 2008 6:02 am

I don't see any other reason why google hasn't indexed the site - this is the only "irregularity" I can think of.

what other reasons can cause this ?

btw, thanks for all the help.
Shakty
 
Posts: 9
Joined: Sun Dec 14, 2008 3:19 am

Postby richardk » Tue Dec 16, 2008 6:46 am

I do not know. I think you would be better off asking at a SEO or full web development forum.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 15 guests

cron