Post by virtualshop34 » Mon Jul 18, 2016 5:33 pm

Hello all,

I am using opencart 2.1.0.2 and config my shop to work with ssl but now all the urls's SEO are not working anymore

before I had

Code: Select all

 http://www.domaine.com/accessoires/product
now I have

Code: Select all

https://www.domaine.com/index.php?_route_=accessoires/product
if I disable the urls's SEO I get

Code: Select all

https://www.domaine.com/index.php?route=product/category&path=59_60
What should I do to get back the rewriting as I was ?

Thanks in advance for your help
Last edited by virtualshop34 on Mon Jul 18, 2016 6:00 pm, edited 1 time in total.

Opencart version 2.1.0.2


New member

Posts

Joined
Wed Jan 18, 2012 1:19 am

Post by virtualshop34 » Mon Jul 18, 2016 6:00 pm

I managed to solve my problem in my htaccess.

Some line should be before some others...

Opencart version 2.1.0.2


New member

Posts

Joined
Wed Jan 18, 2012 1:19 am

Post by digutah » Tue Jul 26, 2016 1:24 am

What was the solution to your problem? I think we have the same problem.

Newbie

Posts

Joined
Wed Apr 04, 2012 1:18 pm

Post by virtualshop34 » Mon Aug 22, 2016 4:21 pm

digutah wrote:What was the solution to your problem? I think we have the same problem.
Hello,

In my case the line about http redirection to https have to be at almost the top of your htaccess between

Code: Select all

RewriteEngine On
and this block

Code: Select all

#RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [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]
and not after as I did

Opencart version 2.1.0.2


New member

Posts

Joined
Wed Jan 18, 2012 1:19 am

Post by HAL13 » Mon May 28, 2018 9:19 pm

Thanks this solved the problem for me as well on OpenCart 2.3.0.2

... in addition, it seems that
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
has to be last so don't reorder SEO settings

Newbie

Posts

Joined
Tue Oct 24, 2017 6:51 pm

Post by bizjaved » Fri Jun 01, 2018 11:14 am

HAL13 wrote:
Mon May 28, 2018 9:19 pm
Thanks this solved the problem for me as well on OpenCart 2.3.0.2

... in addition, it seems that
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
has to be last so don't reorder SEO settings
I tried placing this line at the end, but it caused CSS being lost from the page. As a result, page was ugly.

Newbie

Posts

Joined
Sun Feb 18, 2018 5:00 pm

Post by bizjaved » Fri Jun 01, 2018 11:20 am

Guys, I am facing the similar issue. The site doesn't show SEO friendly URLS in menu, category, and product links
I use Opencart Version 3.0.2.0
My ISP assured the mod_rewrite is on in Apache configuration
I use SSL, https://www.myexample.com
I renamed .htacess.text to .htaccess
I have enabled SEO URLs from store settings
I have added SEO keywords for all the categories, manufacturers, and products

Here is my .htaccess, which was bundled with Opencart.

# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: http://www.opencart.com

Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|.twig|\.ini|\.log|(?<!robots)\.txt))">
Require all denied
## For apache 2.2 and older, replace "Require all denied" with these two lines :
# Order deny,allow
# Deny from all
</FilesMatch>

# 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=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|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Newbie

Posts

Joined
Sun Feb 18, 2018 5:00 pm
Who is online

Users browsing this forum: Majestic-12 [Bot], Semrush [Bot] and 11 guests