Page 1 of 1

Friendly urls not working

Posted: Wed Aug 23, 2017 3:37 pm
by grubybarti666
Despite the fact that I already swiched to the yes option in settings it still shows me http://www.solidnedrzwi.pl/index.php?ro ... ckout/cart can anyone help me ?

This is my htacces

# SEO URL Settings
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteRule ^login\$ https://www.%{HTTP_HOST}/login [R=301,L]


# 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 ^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]

Re: Friendly urls not working

Posted: Thu Aug 24, 2017 2:34 am
by MrPhil
I don't know if it has anything to do with lack of SEF URLs, but I do see an error in your .htaccess

Code: Select all

# SEO URL Settings
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteRule ^login\$ https://www.%{HTTP_HOST}/login [R=301,L]
The last rule I don't think is going to work. It's looking for a URI of /login$ to send to https. Are you intending to run your entire site under SSL (https) or just the login page? Also, it will redirect to https even if it's already coming in under https, and might get into a loop. Also, if the domain comes in as already www, it will make it www.www. Try this:

Code: Select all

# SEO URL Settings
RewriteEngine On
# redirect non-www domain name to www form
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.solidnedrzwi.pl/$1 [R=301,L]
# redirect to SSL (https) ONLY the login page
RewriteCond  %{HTTPS} !on
RewriteCond  %{REQUEST_URI}  ^/login$  [NC]
RewriteRule ^login$ https://www.solidnedrzwi.pl/login [R=301,L]
The rest of the .htaccess looks pretty standard. Try hitting Ctrl+F5 or otherwise forcing a browser refresh (load a new page), just in case you're still seeing a cached copy of the page with the link.

Re: Friendly urls not working

Posted: Thu Aug 24, 2017 2:59 pm
by grubybarti666
Thanks for the help although it probably has nothing to do with friendly URLs.

Re: Friendly urls not working

Posted: Fri Aug 25, 2017 5:29 am
by victorj
Non important urls like login cart etc that have absolute no influenze on your shops rankings dont use seo urls in opencart.
Practilly there not one reason to have those urls converted to friendly url.
If you want do do so anyway there are multiple mods that gice you the ability to change any url on your site like this one

https://www.opencart.com/index.php?rout ... load_id=46