Solved

Homepage redirects www, but blog redirects to non-www

Posted on 2012-03-16
5
499 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
  • 2
  • 2
5 Comments
 
LVL 6

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

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

Suggested Solutions

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
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…
The viewer will learn how to count occurrences of each item in an array.

829 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