Page 1 of 1
Question about trailing slash
Posted: Tue Jul 21, 2020 6:58 pm
by banandominik
Hi guys, i'm newbie here and i can't find answer to my questions.
I have shop on OpenCart Version 3.0.3.3. How to force trailing slash after my URL in every pages? How to remove www., before my url? And how to remove /index.php and /index.html after url of ma homepage?
Is it possible on OpenCart 3?
Re: Question about trailing slash
Posted: Tue Jul 21, 2020 10:40 pm
by letxobnav
How to force trailing slash after my URL in every pages?
what is the point of that?
How to remove www., before my url?
By not putting it there in the first place.
And how to remove /index.php and /index.html after url of ma homepage?
There is no /index.html.
/index.php is what handles all routes on your site unless you activate seo urls, then you can take it off.
Re: Question about trailing slash
Posted: Wed Jul 22, 2020 6:35 pm
by paulfeakins
banandominik wrote: ↑Tue Jul 21, 2020 6:58 pm
How to force trailing slash after my URL in every pages?
You may be able to modify your .htaccess to do it or you could find an extension that does it.
If you can't find an extension, you could pay a developer such as
ourselves or post a job in the
Commercial Support Forum.
Re: Question about trailing slash
Posted: Wed Jul 22, 2020 7:14 pm
by JNeuhoff
Modify your '.htaccess' as per
this direction. This should redirect to URLs without the 'www.' part. Also make sure your config.php files don't use the 'www.' part in their URLs.
For adding the trailing slash to the end of your URL, use this in your '.htaccess':
Code: Select all
#Add Trailing slash for end of the URL
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*[^/])$ /$1/ [L,R]
Re: Question about trailing slash
Posted: Thu Jul 23, 2020 3:57 pm
by banandominik
Thank you so much for answers. Its working for me. Greetings from Poland
