Solved

Homepage redirects www, but blog redirects to non-www

Posted on 2012-03-16
5
495 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now