Post by yoreciv2 » Mon Jan 24, 2022 8:15 am

I have already enabled SEO in admin dashboard.

Here is my .htaccess
File name has been double checked. No error.
However, SEO urls aren't working.
Could someone give me a hint? Thank you.


<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
Order deny,allow
Deny from all
</FilesMatch>

RewriteEngine On

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) [NC]
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

ExpiresActive On
ExpiresDefault A0

<FilesMatch "\.(gif|jpg|jpeg|png|GIF|JPG|JPEG|PNG)$">
ExpiresDefault A2592000
Header append Cache-Control "public"
</FilesMatch>

<FilesMatch "\.(less|js|css|gz)$">
ExpiresDefault A2592000
Header append Cache-Control "proxy-revalidate"
</FilesMatch>

<FilesMatch "\.(php)$">
ExpiresActive Off
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</FilesMatch>

<IfModule mod_headers.c>
<FilesMatch "\.(less|js|css|xml|gz)$">
Header append Vary Accept-Encoding
</FilesMatch>
</IfModule>

# compress text, HTML, JavaScript, CSS, and XML
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE font/woff .woff
AddOutputFilterByType DEFLATE application/x-font-woff
AddOutputFilterByType DEFLATE application/font-woff
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font-otf

# remove browser bugs
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

Order allow,deny
Allow from all

Newbie

Posts

Joined
Mon Jan 24, 2022 8:10 am

Post by ADD Creative » Mon Jan 24, 2022 7:12 pm

Missing.

Code: Select all

RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
After.

Code: Select all

RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) [NC]

www.add-creative.co.uk


Expert Member

Posts

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

Post by yoreciv2 » Tue Jan 25, 2022 8:32 am

I added your code. It's still not working.

It shows the following error
Not Found
The requested URL was not found on this server.

Newbie

Posts

Joined
Mon Jan 24, 2022 8:10 am

Post by ADD Creative » Tue Jan 25, 2022 8:46 am

Try the standard htaccess example that comes with OpenCart.

www.add-creative.co.uk


Expert Member

Posts

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

Post by paulfeakins » Tue Jan 25, 2022 8:56 pm

yoreciv2 wrote:
Mon Jan 24, 2022 8:15 am
SEO urls aren't working.
What happens when you go to one?

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
Who is online

Users browsing this forum: Semrush [Bot] and 249 guests