Hi, I wonder if anyone can help. I'm really quite new to all this so apologies if this is a stupid question. I have just set up a new website using SilverStripe, however my old website (which was just a wordpress blog) still has all its pages listed in the search engines under the non-www domain. I am attempting to put a 301 redirect in the htaccess file to redirect from non-www to www where this new site is, by adding the bit to the bottom of the file:
### SILVERSTRIPE START ###
<IfModule mod_dir.c>
DirectorySlash Off
</IfModule>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
### SILVERSTRIPE END ###
RewriteCond %{HTTP_HOST} ^mydomain\.co.uk [nc]
RewriteRule (.*) http://www.mydomain.co.uk/$1 [R=301,L]
However, for some reason every time I now type in http://mydomain.co.uk I am redirected to http://www.mydomain.co.uk/sapphire/main.php?url=/ instead of just http://www.mydomain.co.uk. Can anyone help with what this sapphire directory is for, and perhaps what I am doing wrong for it to redirect to it?