Solved

Homepage redirects www, but blog redirects to non-www

Posted on 2012-03-16
5
500 Views
Last Modified: 2012-08-14
My site is http://www.stadriemblems.com and I have it redirecting to the www version. Here is my .htaccess code:

RewriteEngine On

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

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} index.html
RewriteRule .* http://www.stadriemblems.com/? [R=301,L]

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !^/order\.html
RewriteCond %{REQUEST_URI} !^/cgi-bin/order\.cgi
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}

Open in new window



But my blog http://www.stadriemblems.com/blog seems to be forcing the www off the URL. Here is the .htaccess of my Wordpress blog:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}

Open in new window


I don't know much about reading .htaccess code; I just copy and paste examples. Am I inadvertently redirecting my blog to the non-www?

I want everything to have the www so Google doesn't think my blog is a different site.
0
Comment
Question by:underrugswept
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 7

Expert Comment

by:torakeshb
ID: 37729776
0
 
LVL 1

Author Comment

by:underrugswept
ID: 37730022
Thanks, torakeshb. I don't think that applies to me. If it does, I don't understand how.
0
 
LVL 9

Accepted Solution

by:
Shaun McNicholas earned 500 total points
ID: 37730495
Sound like a wordpress setting not something wrong with your .htaccess file.
Go into your wordpress admin and check the site url
in Settings: General:
WordPress address (URL) - should be http://www.yoursite.com/yourfolder
Site address (URL) - should be the same
0
 
LVL 1

Author Closing Comment

by:underrugswept
ID: 37730670
Once again I'm over-thinking things. So simple. Thank you!
0
 
LVL 9

Expert Comment

by:Shaun McNicholas
ID: 37730686
Yeah we all do! LOL
Its sometimes too simple and we tend to think its something complex.
Glad I could help.
0

Featured Post

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question