cancel
Showing results for 
Search instead for 
Did you mean: 

301 redirect

BestPump
Grafter
Posts: 42
Registered: ‎19-09-2007

301 redirect

Hi All,
I've been looking at previous posts on how to use a 301 redirect. I'm trying to redirect requests for bestpump.co.uk to www.bestpump.co.uk for SEO reasons.
I have tried the following:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^bestpump\.co\.uk [NC]
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)$ http://www.bestpump.co.uk/$1?%1 [R=301,L]
Unfortunately, this takes down the entire site and gives a 500 internal server error!
Any ideas, please?
Thanks,
Jeff
1 REPLY
BestPump
Grafter
Posts: 42
Registered: ‎19-09-2007

Re: 301 redirect

Whoops! Seems to have stumped everyone!
Well, I found this on the 'Net and it appears to work perfectly!
RewriteEngine on
RewriteCond %{HTTP_HOST} ^bestpump.co.uk [NC]
RewriteRule ^(.*)$ http://www.bestpump.co.uk/$1 [L,R=301]