Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

Mod Rewrite Problems

Is it me?

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

Junior Member

10+ Year Member

joined:Dec 2, 2002
votes: 0

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} !^$
RewriteCond %{HTTP_HOST} !^www.domain.com(:80)?$
RewriteRule ^/(.*) [domain.com...] [L,R=301]
RewriteOptions inherit

any help would be appreciated....

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

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
votes: 0

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...



Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members