Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Homepage redirects www, but blog redirects to non-www

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

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

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

Ready to get certified? Check out some courses that help you prepare for third-party exams.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

722 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