Clicky

When I go to my site as plainly customwovenlabels.com, it works fine.

When I go to it with the www in front, I says it's not found. I have a 301 redirect set up in my .htaccess file that reads as follows:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.customwovenlabels.com [NC]
RewriteRule ^(.*)$ http://customwovenlabels.com/$1 [L,R=301]


# BEGIN WordPress
<ifmodule mod_rewrite.c>
RewriteEngine On
RewriteBase /subdirectory/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /subdirectory/index.php [L]
</ifmodule>
# END WordPress


I think this problem runs very deeply, since even in Google webmaster tools, it cannot verify the www version of the site.

I just have no idea what's wrong!

asked 11/15/2011 10:43

underrugswept's gravatar image

underrugswept ♦♦


9 Answers:
Do you need to remove the www from "RewriteCond %{HTTP_HOST} ^www.customwovenlabels.com [NC]"
link

answered

x3man's gravatar image

x3man

I don't think so, because that's the part where it's telling it to take the www version and redirect it to the non-www version. At least I think it is. I am a little confused because you worded your comment as a question. Sorry.
link

answered 2011-11-16 at 06:54:58

underrugswept's gravatar image

underrugswept

Shouldn't the RewriteCond line actually be:
RewriteCond %{HTTP_HOST} !^customwovenlabels.com [NC]
link

answered 2011-11-16 at 06:56:53

x3man's gravatar image

x3man

Thanks for your comment, but I'm still not sure if you're asking me or telling me.
link

answered 2011-11-16 at 06:59:21

underrugswept's gravatar image

underrugswept

Try changing the line to:
RewriteCond %{HTTP_HOST} !^customwovenlabels.com [NC]

This specifies that when the url is not (as specified by the "!") customwovenlabels.com then it will redirect to http://customwovenlabels.com
link

answered 2011-11-16 at 07:01:48

x3man's gravatar image

x3man

That doesn't seem to work, unless it takes a few minutes. Thanks for the suggestion though.
link

answered 2011-11-16 at 07:07:36

underrugswept's gravatar image

underrugswept

Further explanations here that may help you understand how it works: https://my.bluehost.com/cgi/help/357
link

answered 2011-11-16 at 07:11:53

x3man's gravatar image

x3man

That site was helpful, and it gave me the correct code. Thank you! I will give you at least half the points. Now I'm only left with the issue of Google WM tools still not being able to verify the www version of the site.
link

answered 2011-11-16 at 07:15:55

underrugswept's gravatar image

underrugswept

Not sure why that would be if the redirect is working correctly. Have you tried using the WM tools by forcing a reload of the page in the browser, rather than using the cache? E.g. Ctrl and F5 in internet explorer.
link

answered 2011-11-16 at 07:34:49

x3man's gravatar image

x3man

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×3
×18
×4
×10
×6
×1

Asked: 11/15/2011 10:43

Seen: 427 times

Last updated: 11/16/2011 12:03