Post by decomuc » Sun Nov 28, 2021 6:23 pm

I was looking now so many hours, and i found no solution for my problem.
The SEO URL work only for the first level.

f.e.: example.com/nice-product works perfekt
example.com/category/nice-product route to the default store

example.com/category - work perfect
example.com/category/subcategory - route to default

I use a Litespeed Enterprice Server and i am not sure, after all my changes what is the right setting for all that.

I think its something wrong in the Rewrite options from Litespeed - but I dont really know.

Have someone a similar problem or better a soulution?

I use 3 different domains, all ending with / in the settings.
The default store use www - the other 2 domains route from www to non-www. But that works all fine.

Thats my last rewrite rules...

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://example.com/{REQUEST_URI} [R=301,L]

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 %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

Any ideas?

Newbie

Posts

Joined
Mon Jun 01, 2020 1:58 am

Post by decomuc » Mon Nov 29, 2021 4:54 pm

Found solution...

And surprize.. was very easy.

I used before the rewrite option from the virtualhosts from the litespeedserver config. I deleted all for each domain and use only a .htaccess now.
Now it works fine with 3 different domains.

Newbie

Posts

Joined
Mon Jun 01, 2020 1:58 am

Post by paulfeakins » Mon Nov 29, 2021 7:45 pm

decomuc wrote:
Mon Nov 29, 2021 4:54 pm
Found solution...

And surprize.. was very easy.
Excellent! So please add [SOLVED] to the start of the post title.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by galianedeva » Wed Feb 09, 2022 9:01 pm

decomuc wrote:
Sun Nov 28, 2021 6:23 pm
I was looking now so many hours, and i found no solution for my problem.
The SEO URL work only for the first level.

f.e.: example.com/nice-product works perfekt
example.com/category/nice-product route to the default store

example.com/category - work perfect
example.com/category/subcategory - route to default

I use a Litespeed Enterprice Server and i am not sure, after all my changes what is the right setting for all that.

I think its something wrong in the Rewrite options from Litespeed - but I dont really know.

Have someone a similar problem or better a soulution?

I use 3 different domains, all ending with / in the settings.
The default store use www - the other 2 domains route from www to non-www. But that works all fine.

Thats my last rewrite rules...

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://example.com/{REQUEST_URI} [R=301,L]

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 %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

Any ideas?
Hello man , are y around ?
Can y pls can you give me your .htaccess file - i use 1 domain with non www -ols. I cant enable seo ,i cant get rid from 404 too many redirects error if i enable it with few pages .

Ty in advance . I hope y r still around

Newbie

Posts

Joined
Wed Jan 19, 2022 1:34 pm
Who is online

Users browsing this forum: DesignCart, Google [Bot], paulfeakins, Semrush [Bot] and 101 guests