creative7 Posted June 30, 2015 Share Posted June 30, 2015 I am developing our new site design on a sub domain(1.6) and will eventually port this to our main domain which is currently running 1.5. I need some information on 301 site redirection in prestashop and where I need to put the redirects Thanks in advance Link to comment Share on other sites More sharing options...
vekia Posted June 30, 2015 Share Posted June 30, 2015 you just simply want to redirect 301 from domain A to domain B ? for example: domainA.com/1-product.html -> domainB.com/1-product.html domainA.com/2-product.html -> domainB.com/2-product.html ... and so on? Link to comment Share on other sites More sharing options...
creative7 Posted June 30, 2015 Author Share Posted June 30, 2015 (edited) Hi vekia, Yes exactly that, where are the redirects placed? Or is there any documentation on this subject? Edited June 30, 2015 by creative7 (see edit history) Link to comment Share on other sites More sharing options...
creative7 Posted June 30, 2015 Author Share Posted June 30, 2015 i have at the moment testshop.domain.com (the new site) and the old site domain.com, when the new site is finished i will change that from testshop.domain.com to domain.com, but i need redirects from old site pages to new site pages... if that makes any sense at all Link to comment Share on other sites More sharing options...
creative7 Posted June 30, 2015 Author Share Posted June 30, 2015 @vekia Will the information in this thread work for this particular case? https://www.prestashop.com/forums/topic/446710-solved-site-migrate-old-urls-to-new-urls-issue-with-rewriting/?hl=%2B301+%2Bredirect&do=findComment&comment=2072168 Link to comment Share on other sites More sharing options...
creative7 Posted July 6, 2015 Author Share Posted July 6, 2015 can i just double check this is right, following rewrites in .htaccess RewriteCond %{HTTP_HOST} ^www.cabinmax.com/en/home/110-shirt-tidy-2-pack-2nd-generation-0702679484890.html [NC] RewriteRule ^(.*) http://www.cabinmax.com/accessories-1/188-shirt-tidy-2-pack-2nd-generation-0702679484890.html [R=301] RewriteCond %{HTTP_HOST} ^www.cabinmax.com/en/carry-on/101-madrid-0616316228764.html [NC] RewriteRule ^(.*) http://www.cabinmax.com/carry-on/180-madrid-0616316228764.html [R=301] Thanks in advance for any help Link to comment Share on other sites More sharing options...
sandeep552 Posted July 6, 2015 Share Posted July 6, 2015 You need to use 301 permanent redirection from old or removed pages to new version of same page. Link to comment Share on other sites More sharing options...
creative7 Posted July 6, 2015 Author Share Posted July 6, 2015 Hi Sandeep, The top link is my old page and bottom link is the new page, is this the correct way to format it? and also do these redirects go into the .htaccess file? Link to comment Share on other sites More sharing options...
sandeep552 Posted July 6, 2015 Share Posted July 6, 2015 Hi Sandeep, The top link is my old page and bottom link is the new page, is this the correct way to format it? and also do these redirects go into the .htaccess file? Yes PrestaShop its the right example of 301 rediraction. "" rewritecond %{http_host} ^domain.com [nc] rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc] """ Link to comment Share on other sites More sharing options...
creative7 Posted July 21, 2015 Author Share Posted July 21, 2015 These redirects have not worked in the .htaccess file any suggestions please? Link to comment Share on other sites More sharing options...
clint Posted July 21, 2015 Share Posted July 21, 2015 (edited) At the very bottom of the htaccess on the 1.5 setup try redirect 301 /old-page-name http://www.new.subdomain.com/pagename.html Notice you don't use the domain name for the 1.5 setup just use /path/to/product.html Just hope you don't have lots of products! **Edit Just noticed you'll be moving to the proper domain not sending traffic to the subdomain.... Let me have a think** OK.. so yu'll need to put at the bottom of the htaccess file redirect 301 /old-page-name1.html /new-page-name1.html redirect 301 /old-page-name2.html /new-page-name2.html redirect 301 /old-page-name3.html /new-page-name3.html redirect 301 /old-page-name4.html /new-page-name4.html You may need to change (in seo and urls) the route to products, categories and cms so you don't have any conflicts. As long as the route is slightly different on the new site you'll be fine. Edited July 21, 2015 by clint (see edit history) Link to comment Share on other sites More sharing options...
creative7 Posted July 22, 2015 Author Share Posted July 22, 2015 Clint, Thanks for the info, and unfortunately, I have around 500 links to redirect... the fun begins! Link to comment Share on other sites More sharing options...
Recommended Posts