Elxis CMS Forum

Support => General => Topic started by: ipghmagnet on October 10, 2020, 11:12:30

Title: strange duplicated url and route
Post by: ipghmagnet on October 10, 2020, 11:12:30
Dear Heros,

I recently watch my website by seo monitor software. It reminds duplicated url.

Here should be : https://www.nbvsmagnetic.com/neodymium-magnet/block-magnet/cube-ndfeb-magnet.html

But I found https://www.nbvsmagnetic.com/neodymium-magnet/cube-ndfeb-magnet.html 
it is also workable and open same page

And https://www.nbvsmagnetic.com/cube-ndfeb-magnet.html
it is also workable and open same page.

Even i add some words in side:  https://www.nbvsmagnetic.com/neodymiummm-magnetmm/block-magnet/cube-ndfeb-magnet.html
it is also workable and point to same page.

I use 4.5version..

Kindly give me some advice to correct it.. Thanks. .

ipghmagnet
Title: Re: strange duplicated url and route
Post by: michalis1984 on October 10, 2020, 13:35:10
 For the links you are mentioning only the last segment of the URL matters. They all drive to the same content. This is how Elxis Router works, in order to be quick. If you only put links driving to the "original" URL this shouldn't be a problem.
Title: Re: strange duplicated url and route
Post by: ipghmagnet on October 13, 2020, 04:46:56
Dear michalis1984,
Thanks for your explaination. I got your idea.
But in this way, is there any damage to SEO due to duplicated content?

Any one is special in SEO? Kindly advise.

Thanks.
Title: Re: strange duplicated url and route
Post by: webgift on October 14, 2020, 15:33:11
This is a bug and should be fixed.
Serving the same HTML document to search engines cause negative
SEO results.
Title: Re: strange duplicated url and route
Post by: datahell on October 14, 2020, 21:37:53
For the links you are mentioning only the last segment of the URL matters. They all drive to the same content. This is how Elxis Router works, in order to be quick. If you only put links driving to the "original" URL this shouldn't be a problem.

Exactly michalis, speed is the reason! This is absolutely correct functionality and not a bug. The purpose of a 2nd level router (*) within an Elxis component is to detect which component's method to call, not to validate the URL (although it performs a basic validation). User access, proper categories tree, etc, are checked within the method loaded and everything is shown with the correct paths, regardless how you requested the page. See Elxis content router (content.php) to understand how component content handles user requests.

Also note: Elxis generates only 1 unique link for each article. All the other possible links are not used, are not been displayed, and so there is no way to get duplicated links except if you make it manually on purpose!

* The top level router is the Elxis Router library which is executed by Elxis core and its purpose is to load the right component.

If you dont like this you can easily generate an error 404 page in case the full URL is not exactly the right one (I advise you not to do it). Here is how to do it:

Open components/com_content/controllers/article.php
Find line 60: unset($n, $last, $segs, $seotitle);
Add below:
if ($eURI->getUriString() != $row->link) {
     exitPage::make('404', 'CCON-0017', $eLang->get('ARTICLE_NOT_FOUND'));
}


That's all!
Title: Re: strange duplicated url and route
Post by: webgift on October 15, 2020, 12:34:31
My comment was pointed to SEO bug (issue). It's not a
functionality bug... the only sure :)
Title: Re: strange duplicated url and route
Post by: ipghmagnet on October 16, 2020, 09:01:33
You guys are great. Thanks for support.
I feel proud to find problems on elxis.  ;D