Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Homepage redirects www, but blog redirects to non-www

Posted on 2012-03-16
5
Medium Priority
?
506 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 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 2000 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
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…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

916 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