Post by mikeinterserv » Tue Dec 29, 2020 7:56 am

I am trying to redirect incoming urls from google from an older site.
I have tried htaccess redirect and rewrite but can only get SOME of the redirects to work.

I cannot get either of these to work
Redirect 301 /index.php?route=product/category&path=341_319 https://mydomain.co.uk/Shop/red-cars/ford-red
RewriteRule ^index.php?route=product/category&path=341_319$ /https://mydomain.co.uk/Shop/red-cars/ford-red/ [END,R=301]
and this
Redirect 301 /accessories/Roll-Film https://mydomain.co.uk/Shop/all-parts-a ... -roll-film
goes to
https://mydomain.co.uk/Shop/all-parts-a ... /ROLL-FILM
it takes the last part of the incoming url and instead of redirecting fully it redirects partly but replaces all-roll-film with ROLL-FILM which I just cannot fathom at all

I CAN get these to work
Redirect 301 /red-cars https://mydomain.co.uk/Shop/red-cars/ford-red
Any help would be much appreciated

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by rjcalifornia » Tue Dec 29, 2020 11:42 am

mikeinterserv wrote:
Tue Dec 29, 2020 7:56 am
I am trying to redirect incoming urls from google from an older site.
I have tried htaccess redirect and rewrite but can only get SOME of the redirects to work.

I cannot get either of these to work
Redirect 301 /index.php?route=product/category&path=341_319 https://mydomain.co.uk/Shop/red-cars/ford-red
RewriteRule ^index.php?route=product/category&path=341_319$ /https://mydomain.co.uk/Shop/red-cars/ford-red/ [END,R=301]
and this
Redirect 301 /accessories/Roll-Film https://mydomain.co.uk/Shop/all-parts-a ... -roll-film
goes to
https://mydomain.co.uk/Shop/all-parts-a ... /ROLL-FILM
it takes the last part of the incoming url and instead of redirecting fully it redirects partly but replaces all-roll-film with ROLL-FILM which I just cannot fathom at all

I CAN get these to work
Redirect 301 /red-cars https://mydomain.co.uk/Shop/red-cars/ford-red
Any help would be much appreciated
I don't know why are you doing that, but this should help:

http://httpd.apache.org/docs/current/mo ... write.html

Also the RewriteRule doesn't include the query string. You will need to set up 2 rules:
1. One that redirects the ugly url to the nice url.
2. One rule needs to rewrite the nice url to an actual working url

Image


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide

Post by cedcommerceteam » Tue Dec 29, 2020 12:08 pm

Hello,

Hope you are doing well.

Please have a look at the following link -

https://opencart.tips/seo-redirection-opencart

Hope this will you.

Thanks!!!

Call us at : (+91) -8765210318 , Skype: live:carlmorgan.cedcommerce , Email: support@cedcommerce.com
CedCommerece : Officail Opencart Partners
CedCommerce Official : www.cedcommerce.com
Opencart Services : www.cedcommerce/opencart-services.com
Sell On various Marketplace Integration : Opencart-Extensions
Magenative Mobile App/IOS Development : magenative.com
Webinar : Holiday Season Webinar


User avatar
Active Member

Posts

Joined
Wed Aug 09, 2017 9:02 pm
Who is online

Users browsing this forum: Baidu [Spider] and 20 guests