I am trying to redirect my site from non-www to www. My site is at [http://www.alennuskoodit.us]. I try to make it so that all requests without www would be redirected to www. Normal stuff so far.

However, if I go to <http://alennuskoodit.us> I end up here: <http://www.alennuskoodit.us/index.php?qstr=http://www.alennuskoodit.us>

This is the .htaccess:

```
Options +FollowSymLinks
Options +Indexes

<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /

# going to install folder
RewriteCond %{REQUEST_URI} (.*)/install/?$
RewriteRule ^(.*)$ %1/install/index.php [NE,R,L]

# going to Admin folder
RewriteCond %{REQUEST_URI} (.*)/admin/?$
RewriteRule ^(.*)$ %1/Admin/index.php [NE,R,L]

# working with client side
RewriteRule ^(.*)/$ index.php?qstr=$1 [L]

</IfModule>

```

This is what I tried, which doesn't work:

```
RewriteCond %{HTTP_HOST} ^alennuskoodit.us [NC]
RewriteRule ^(.*)$ http://www.alennuskoodit.us/$1 [R=301,NC,L]

```

How could I redirect all queries to <http://alennuskoodit.us> to <http://www.alennuskoodit.us> so that I would not end up breaking the other rewrites?