301 Redirects on move to Opencart

  • Thread starter Thread starter RogerBa
  • Start date Start date
R

RogerBa

Hi

I am moving one of my sites from an old bespoke platform to Opencart, and before I complete the move I'd like to get all the 301s set up in .htaccess
The domain name will remain the same but the site will be on a new sever with a new host

The old site produced URL looking like this:
http://www.domain.com/ViewProduct.php?productid=242

The new Opencart site will of course have SEO friendly URLs looking like:
http://www.domain.com/coloured-skull

Am I right in assuming that this wouldn't work??????
redirect 301 /ViewProduct.php?productid=242 http://www.domain.com/coloured-skull

Would I be right in saying that the 301s need to look like this:
RewriteCond %{QUERY_STRING} (^|&)productid=242($|&)
RewriteRule ^ViewProduct\.php$ /coloured-skull? [L,R=301]

I already have all the redirects worked out for around 200 pages, it's just a question of writing them correctly so they work right away. The old site doesn't have many inbound links and doesn't feature highly in google, however I guess it's right to try and protect what there is by using 301s.

I have a couple of other questions but I'll ask them separately to avoid confusion, many thanks.
 

Latest Articles