Canonical URL and Multi-domain

  • Posts: 20
  • Thank you received: 0
8 years 3 months ago #265160

-- url of the page with the problem -- : hivoox.com
-- HikaShop version -- : HikaShop Busin 3.0.1
-- Joomla version -- : Joomla! 3.6.5 Stable
-- PHP version -- : 5.6.28

Hello,

We have several domains, pointed at a single joomla installation.
We use the "Language domains plugin" to manage the multi-domain, and all work fine.

www.domain.com (Main domain)
www.domain.fr
www.domain.pt

Hika shop and hikamarket work correctly, except that the canonical URLs of the products. When we activate "Use the canonical URL if specified" , the system only considers the main domain, and this causes 404 errors.

Example:
Product : MON PRODUIT
Url: domain.fr/monurlproduit.html
URL canonical: monurlproduit

When customer clic to this product, he is redirected to domain.com/monurlproduit.html
While he had to stay on domain.fr ( domain.fr/monurlproduit.html).

Do you have any solution to help us solve this problem?

Last edit: 8 years 3 months ago by paulo25ci.

Please Log in or Create an account to join the conversation.

  • Posts: 83986
  • Thank you received: 13603
  • MODERATOR
8 years 3 months ago #265211

Hi,

First, I see two canonical URLs on your product pages.
So you should fix that.
One must come from HikaShop (the one you specified in the product), the other, another extension.

Second, a canonical URL with just the alias of the product is not normally valid.
You should normally have the menu item alias in the URL, unless the menu item is the homepage, but it doesn't seem that your home page is a products/categories listing menu item.
So actually, even domain.com/virtual-number-algeria should result in a 404.
It works but I don't know why. You must have done something else you didn't say in order to have that to work, and what you did is probably done only for the main website and not the other domains.
But it's hard to say much more.
One thing is sure: HikaShop doesn't change the domain name for the canonical URL.
If you are on the .pt website, the canonical URL will be with .pt domain name.
HikaShop adds the domain name to the text you specify in the canonical URL field by asking Joomla what the current domain name is. It does that by calling the function JURI::base() of the Joomla API which returns the current domain name:
docs.joomla.org/API15:JURI/base
That's unless there is some other extension messing with the URLs in some way.

Please Log in or Create an account to join the conversation.

  • Posts: 20
  • Thank you received: 0
8 years 3 weeks ago #269926

Hello Nicolas,

We still have the same issue.
We have erased all canonical url from products page, and activate "Use the canonical URL if specified", and get always
404 error.

When we clic to the product : domain.fr/monurlproduit.html).
We are redirect to domain.com/monurlproduit.html
And thats cause 404 error.

This problem occour only whith hikashop. Never with other components.

Joomla! 3.6.5
Hikashop
HikaShop Business: 3.0.1
HikaMarket Multivendor: 1.7.2
HikaAuction: 2.0.0

Need your help please, because our site is in production.

Please Log in or Create an account to join the conversation.

  • Posts: 83986
  • Thank you received: 13603
  • MODERATOR
8 years 3 weeks ago #269931

Hi,

As I said, it's not HikaShop which does that.
Please make sure that the live_site setting of your configuration.php is empty or always contains the URL of the current domain name.
Please also check your .htaccess as to not have redirects on the different domain names.
Finally, check the other extensions you have. The first thign to check here are the system plugins. Try deactivating them one by one and refresh the cache and access the homepage and try the process again each time to see if it solves the problem until you the plugin causing that issue if any.
These are only guesses of the most probable things I could think of.

Please Log in or Create an account to join the conversation.

Time to create page: 0.047 seconds
Powered by Kunena Forum