Post by david3217 » Wed Jan 29, 2020 8:25 pm

I've updated our webshop (OC 1.5.6.) to a new version (V2.3.0.2).
Now when i click an indexed link on Google to the new webshop i get an url like this: ** removed by mod **

And actually, the bold part is the right URL. But it shows a page not found instead, because it somehow adds ?_route_= etc behind it. When i remove that part manually, the link works fine.

So how can i make it go right directly?
I have pretty much zero .htaccess mod_rewrite knowledge, i've already tried some things i could find online, but they didn't work.

This is how my .htaccess mod_rewrite part looks like:

Code: Select all

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/ 

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{HTTPS} !on
RewriteCond %{THE_REQUEST} \ /index\.php\?_route_=?([^&\ ]*)
RewriteRule ^(.*)$ https://www.mijnsieradenshop.nl/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
Last edited by david3217 on Fri Jan 31, 2020 2:13 pm, edited 2 times in total.

Newbie

Posts

Joined
Tue Apr 30, 2019 3:59 pm

Post by wrick0 » Wed Jan 29, 2020 10:10 pm

Isnt that added in your sitemap.xml which gets send to google?

Active Member

Posts

Joined
Fri Jan 18, 2019 10:00 pm
Location - 127.0.0.1 @ The Netherlands

Post by ADD Creative » Wed Jan 29, 2020 10:29 pm

This line looks wrong for a start.

Code: Select all

RewriteCond %{THE_REQUEST} \ /index\.php\?_route_=?([^&\ ]*)
Are you saying the search engine has indexed URLs with ?_route_= in or are your reditects adding ?_route_=?

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by _rhensu » Wed Jun 03, 2020 3:18 pm

ADD Creative wrote:
Wed Jan 29, 2020 10:29 pm
This line looks wrong for a start.

Code: Select all

RewriteCond %{THE_REQUEST} \ /index\.php\?_route_=?([^&\ ]*)
Are you saying the search engine has indexed URLs with ?_route_= in or are your reditects adding ?_route_=?

I'm having the same problem and it occurs when I redirected some url's. Hoping for your help to fix this. Thanks!

Newbie

Posts

Joined
Wed Jun 03, 2020 3:16 pm

Post by _rhensu » Wed Jun 03, 2020 3:20 pm

I'm having the same problem after I redirected some url's.
Hoping for someone's help to fix this. Thanks!

Newbie

Posts

Joined
Wed Jun 03, 2020 3:16 pm

Post by ADD Creative » Wed Jun 03, 2020 8:09 pm

You will need to provide more information if anyone is going to be able to help you. OpenCart version and details of the problem. Contents of htaccess if the problem relates to redirects or rewrites.

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 14 guests