Forum Moderators: phranque

Message Too Old, No Replies

Mod Rewrite Problems

Is it me?

         

phish

10:34 pm on Feb 17, 2006 (gmt 0)

10+ Year Member



Breif explanation of what I did.
I rewrote index.htm > www.domain.com
rewrote domain.com > www.domain.com
rewrote ip > www.domain.com

All my headers are returning proper 301's , but now for some reason Google is indexing the non www version which they never did before. My main reason for the non www > www, was to redirect any links that people may have entered without the www. So my question is did I mess up the code, I checked it twice, or is it Google? Here's my code

RewriteEngine on
RewriteCond %{THE_REQUEST}^[A-Z]{3,9}\ /index\.htm\ HTTP/
RewriteRule ^/index\.htm$http://www.domain.com/ [L,R=301]
RewriteCond %{HTTP_HOST} !^111.111.111.111(:80)?$
RewriteCond %{HTTP_HOST} !^www.domain.com(:80)?$
RewriteRule ^/(.*) [domain.com...] [L,R=301]
RewriteOptions inherit

any help would be appreciated....

jdMorgan

12:15 am on Feb 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If this code is for use in httpd.conf, then I see no problem other than a missing space between the pattern end-anchor and the substitution URL in the first rule.

What do you mean by "Google is indexing"? Are your non-www URLs listed in search results *without* a "Supplemental" label? It may take a month or more for your new rules to affect the Google SERPs...

Jim