Forum Moderators: phranque
We have a few virtual servers set up on one webserver (RedHat/Apache). Google Results for "Jonglei Bucket" display both the virtual domain URL (the one we want) and the physical domain:
1. geography.ou.edu/courses/1103bw/16-reactions.htm
2. geowww.gcn.ou.edu/~geog/courses/1103bw/16-reactions.htm
Does anyone know of a way to restrict the searching to only the virtual server addresses? I don't think a robots file will work and I can't find information on this anywhere! Thanks in advance.
(Similar results on Yahoo and Inktomi searches.)
Alicia
If Google is showing both, it's because someone is linking to both, and Google has found and crawled those links.
You could setup something that detects the requested URI, then 301 redirects to virtually-served site if the other is requested. Google should follow this redirect and eventually drop the other link from their index.
You'll find it very helpful for understanding the basics.
The following code in a .htaccess file will send all requests that are not somedomain.com to www.somedomain.com and return a 301 response.
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST}!^www\.somedomain\.com$
RewriteRule ^(.*)$ http://www.somedomain.com/$1 [L,R=301]
It's not exactly what you need but it's close. After you finish the Intro suggested by Marcia, you should be able to revise it meet to your needs. And our regulars are usually happy to help you learn if you get stuck.
Welcome! :)
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.somedomain\.com
RewriteRule ^(.*)$ [somedomain.com...] [L,R=301]
Jim