Why do the SEO urls contain en-gb folder now?
Is there an easy way to remove this? For example:
.com/en-gb?route=common/home
.com/en-gb/catalog/desktops/pc
to just:
.com/
.com/pc
Is there an easy way to remove this? For example:
.com/en-gb?route=common/home
.com/en-gb/catalog/desktops/pc
to just:
.com/
.com/pc
Please provide more details if you want help here: OC version, extensions used, website URL
In a standard OpenCart 4 the default language isn't shown s part of the URL.
In a standard OpenCart 4 the default language isn't shown s part of the URL.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
4.0.1.1
No extensions
I created a multi store in settings, could this be the reason why it's using language in the URL?
It's also using product:
en-gb/product/tablet/samsung-galaxy-tab-10-1
I have removed the multi store and still using language, etc in url.
I see, getting the same with SEO Urls enabled on the master branch.
I don't see a way to change this, unless the core gets modified to handle SEO keywords the way it used to be in OpenCart 3.
BTW.: There's still a bug in the SEO Url editor, see https://github.com/opencart/opencart/issues/12136
I don't see a way to change this, unless the core gets modified to handle SEO keywords the way it used to be in OpenCart 3.
BTW.: There's still a bug in the SEO Url editor, see https://github.com/opencart/opencart/issues/12136
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Just a quick try, haven't tested a lot.
Open file /system/library/url.php and find the following code:
And, replace with the following code:
https://webocreation.com/how-to-remove- ... pencart-4/
Open file /system/library/url.php and find the following code:
Code: Select all
if (!$js) {
return str_replace('&', '&', $url);
} else {
return $url;
}
Code: Select all
if (!$js) {
return str_replace('en-gb/', '', str_replace('&', '&', $url));
} else {
return str_replace('en-gb/', '',$url);
}
Opencart 4 book
Blog free tips and tricks
Free extensions
OpenCart Tutorials
OpenCart Tutorials Youtube Video for developers
this didnt work, it did get rid of the en-gb, but it left the un-seo query such as /product/product_name?language=en-gbspeakspaceAdmin wrote: ↑Fri Aug 25, 2023 5:29 amGo to Design > SEO url. Find the en-gb one and delete that little sucker.
if i just clear the keyword, its closer, but you get 2 //
ok i worked out that you can fix the // bug easily , as found that it was intended to be a valid option to leave keyword blank to hide a parameter
https://github.com/opencart/opencart/pull/12651
"Leave blank if you just want to remove the perimeter."
https://github.com/opencart/opencart/pull/12651
"Leave blank if you just want to remove the perimeter."
The "/en-gb" in SEO URLs is likely due to language or regional settings. You can often fix this by adjusting the default language in your OpenCart settings to remove the language code from URLs. This should result in cleaner URLs like "example.com" and "example.com/pc".scottyboyyy wrote: ↑Sun Jan 08, 2023 7:35 pmWhy do the SEO urls contain en-gb folder now?
Is there an easy way to remove this? For example:
.com/en-gb?route=common/home
.com/en-gb/catalog/desktops/pc
to just:
.com/
.com/pc
Who is online
Users browsing this forum: No registered users and 5 guests