Post by banandominik » Tue Jul 21, 2020 6:58 pm

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?

Newbie

Posts

Joined
Mon Jul 20, 2020 4:04 pm

Post by letxobnav » Tue Jul 21, 2020 10:40 pm

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.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by paulfeakins » Wed Jul 22, 2020 6:35 pm

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.

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


User avatar
Legendary Member
Online

Posts

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

Post by JNeuhoff » Wed Jul 22, 2020 7:14 pm

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]

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by banandominik » Thu Jul 23, 2020 3:57 pm

Thank you so much for answers. Its working for me. Greetings from Poland ;)

Newbie

Posts

Joined
Mon Jul 20, 2020 4:04 pm
Who is online

Users browsing this forum: No registered users and 9 guests