I'm seeing a lot of "The page you requested cannot be found!" error landing pages.
What I think is the issue is that the old site had .html at the end of a lot of pages and the new version of OC has done away with that.
Am I right? (Example: old opencart version url - www.mysite.com/store/benefits.html | new opencart version url: www.mysite.com/store/benefits)
I tried redirecting those pages with code in the htaccess file (the htaccess file in my /store file, since my store is in the /store directory)
I looked at the original rewrite code:
Code: Select all
## SEO URL Settings
RewriteEngine On
# If your opencart installation does not run in the main web folder make sure the following is set to the folder it does run in, i.e. / becomes /shop/
RewriteBase /store/
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|webp|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
Code: Select all
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run in the main web folder make sure the following is set to the folder it does run in, i.e. / becomes /shop/
RewriteBase /store/
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
# Redirect .html to extensionless URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^store/(.+)\.html$ /store/$1 [R=301,L]
# General OpenCart SEO URL rule
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|webp|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
So, I'm guessing I did not do it correctly. So I figured I would come here and see if anyone knows a different/better way to accomplish this.
Disclaimer, I am using Cloudfare, but I paused it during this attempt. And also tried using incognito mode