Support-Forum

jDownloads for Joomla 3.x => jDownloads 3.9 => Topic started by: rikoooo on 23.09.2021 01:05:48

Title: Duplicate content issue Suggestion
Post by: rikoooo on 23.09.2021 01:05:48
Hello friends,

I have a little issue about jdownloads 3.9 (and previous version) with SEF URLs.

I have configured Jdownloads to make URLs look like this :
https://www.exemple.com/downloads/viewdownload/51/981 where 51 is the category ID and 981 the download ID.

My issue is, if I remove the category (51) from the URL like this: https://www.exemple.com/downloads/viewdownload/981 the URL will show the download page instead of redirecting to the normal URL: https://www.exemple.com/downloads/viewdownload/51/981 which creates a duplicate content in Google Search.

Could you tell me which part of the PHP code I should edit to force a 301 redirect to the correct URL ?

Thanks in advance

Erik
Title: Re: Duplicate content issue
Post by: ColinM on 23.09.2021 13:15:49
Erik,
What is the problem with including the reference to the category?
Also what did you set to make them https://www.exemple.com/downloads/viewdownload/51/981  ?  The emphasis on usere friendly links is much much reduced these days.

There are multiple places where jD generates the links and it is not simple to describe.  It also depends on the Front End Parameters etc etc.  Sorry not the news you were looking for :( .  When I understand better from your response to above may be feasible to adviser.

Colin
Title: Re: Duplicate content issue
Post by: rikoooo on 23.09.2021 13:23:59
Hi Colin,

All I want is https://www.exemple.com/downloads/viewdownload/ID should redirect to https://www.exemple.com/downloads/viewdownload/CATID/ID, so no duplicate.

Thanks
Title: Re: Duplicate content issue
Post by: ColinM on 23.09.2021 14:07:39
Rikoooo, Forgot that this is not a jD thing!!You should be able to set a redirect in your .htaccess file  -with a 301 redirect but I am no expert!!!  Getting it yo be a variable is ......

Colin
Title: Re: Duplicate content issue
Post by: rikoooo on 23.09.2021 14:15:15
I think it's a JD thing,

How does an .htaccess file can guess the CATID ? It can't.

/downloads/viewdownload/ID to /downloads/viewdownload/CATID/ID must be done within JD.

I will find a way. Thanks
Title: Re: Duplicate content issue
Post by: ColinM on 23.09.2021 15:07:12
Rikoooo
Whoops yes I had around the wrong way!!Colin