Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I'm confused about how to force my url to use www in the address.

I have a .htaccess code like this:

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

I'm changing

RewriteRule . /index.php [L]


RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]

but I still get an error.

The page isn't redirecting properly when I open http://www.mysite.com/category

share|improve this question

marked as duplicate by Simon Hayter, John Conde May 10 '13 at 17:54

This question was marked as an exact duplicate of an existing question.

Your .htaccess looks like you are using Wordpress. Is this true? If that is the case, just go to Settings -> General and change WordPress Address (URL) and Site Address (URL) to versions with 'www'.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.