Remove article id from url for joomla 3.0 gives 404 Topic is solved

Discuss Search Engine Optimization in relation to Joomla! 3.x. This forum will also have discussions on SEF/SEO Joomla! 3.x extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
agilalberdi
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Fri Sep 28, 2018 1:39 pm

Remove article id from url for joomla 3.0 gives 404

Post by agilalberdi » Sun Nov 18, 2018 8:31 pm

Hi,

We have change the versión of the Joomla platform, from 2.5 to 3.8. On the new one we were able to remove the ID from the URLs, but the problem is that we have a lot of URLs indexed with the ID included. And all of those URLs are giving us a lot of 404.

Indexed URLs
http://www.eexcellence.es/index.php/bib ... w-y-linsky

Actual One
http://www.eexcellence.es/index.php/bib ... w-y-linsky

Can I do something?, do you suggest me anything?

Thanks

Alejo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 220
Joined: Fri Aug 19, 2005 12:28 pm
Contact:

Re: Remove article id from url for joomla 3.0 gives 404

Post by Alejo » Mon Nov 19, 2018 8:57 pm

Hi,

My suggestion would be to create an .htaccess rule that redirects to the no-ID version of the URL.

Something like this:

Code: Select all

RewriteRule ^biblioteca-empresarial/([0-9].*)-(.*) http://www.eexcellence.es/index.php/biblioteca-empresarial/$2 [R=301,L]
Suerte!

Alejandro
https://www.jreviews.com/joomla directory, classifieds, and reviews system for Joomla and WordPress

User avatar
zagrox
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sun Jan 10, 2010 11:08 pm
Location: Tehran
Contact:

Re: Remove article id from url for joomla 3.0 gives 404

Post by zagrox » Tue Nov 20, 2018 7:02 am

In current version of joomla this will be fixed very easy by clicking on article options and in integration advanced just change the route to modern and done

User avatar
kiasati
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 164
Joined: Thu May 26, 2016 6:08 am
Contact:

Re: Remove article id from url for joomla 3.0 gives 404

Post by kiasati » Tue Nov 20, 2018 2:09 pm

If it's not broken, don't fix it!

but you have done it and Google has indexed them. so you can just turn it back to have the id in the URL as before.
You better redirect all of them with one rule without any error. it depends on the number of pages.

your ranking might get a hit, but it will be OK after a while.

but you must fix the 404 problems as soon as possible.
Learning never stops...

agilalberdi
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Fri Sep 28, 2018 1:39 pm

Re: Remove article id from url for joomla 3.0 gives 404

Post by agilalberdi » Tue Nov 20, 2018 2:35 pm

zagrox wrote:
Tue Nov 20, 2018 7:02 am
In current version of joomla this will be fixed very easy by clicking on article options and in integration advanced just change the route to modern and done
Hi zagros, this is what we have done for the new versión but we have a lot of the OLD URLs with the ID that are allready indexed. Thanks for your answer

agilalberdi
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Fri Sep 28, 2018 1:39 pm

Re: Remove article id from url for joomla 3.0 gives 404

Post by agilalberdi » Tue Nov 20, 2018 2:37 pm

kiasati wrote:
Tue Nov 20, 2018 2:09 pm
If it's not broken, don't fix it!

but you have done it and Google has indexed them. so you can just turn it back to have the id in the URL as before.
You better redirect all of them with one rule without any error. it depends on the number of pages.

your ranking might get a hit, but it will be OK after a while.

but you must fix the 404 problems as soon as possible.
Thanks Kiasati, wat I do not know is the code to fix it. I have tried somes but do not fixed it. Thanks

Alejo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 220
Joined: Fri Aug 19, 2005 12:28 pm
Contact:

Re: Remove article id from url for joomla 3.0 gives 404

Post by Alejo » Tue Nov 20, 2018 2:44 pm

@agilalberdi: with the approach I suggested you would need to add one redirect line for each of your categories. Basically, anything with the format:

/category/id-article-alias

If you have subcategories, then you would need to extend the approach. So for example, if you had a subcategory with a menu before, the URL looked like this:

/category/subcategory/id-article-alias

The redirect would be:

Code: Select all

RewriteRule ^category/subcategory/([0-9].*)-(.*) http://www.eexcellence.es/index.php/category/subcategory/$2 [R=301,L]
Unless you have thousands of categories, the approach should be manageable. And even if you have hundreds its doable. The other solution is for you to write your own redirect script that handles this automatically.
https://www.jreviews.com/joomla directory, classifieds, and reviews system for Joomla and WordPress

agilalberdi
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Fri Sep 28, 2018 1:39 pm

Re: Remove article id from url for joomla 3.0 gives 404

Post by agilalberdi » Tue Nov 20, 2018 2:56 pm

http://www.eexcellence.es/index.php/bib ... d-p-norton

Thanks, I will do it as you said. But with the URLs with only one word is working but in someones like this It is giving me

http://www.eexcellence.es/index.php/bib ... ial/norton

Instead of

http://www.eexcellence.es/index.php/bib ... d-p-norton

The sentence I place it is, as without the index.php is not working

RewriteRule ^index.php/biblioteca-empresarial/([0-9].*)-(.*) http://www.eexcellence.es/index.php/bib ... esarial/$2 [R=301,L]

Alejo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 220
Joined: Fri Aug 19, 2005 12:28 pm
Contact:

Re: Remove article id from url for joomla 3.0 gives 404

Post by Alejo » Tue Nov 20, 2018 4:26 pm

Try this:

Code: Select all

RewriteRule ^biblioteca-empresarial/([0-9]+)-(.*) http://www.eexcellence.es/index.php/biblioteca-empresarial/$2 [R=301,L]
And clear your browser cache because previous redirects my be cached in the browser and the new rule will not work if you try with the same URLs you tested before.
https://www.jreviews.com/joomla directory, classifieds, and reviews system for Joomla and WordPress

agilalberdi
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Fri Sep 28, 2018 1:39 pm

Re: Remove article id from url for joomla 3.0 gives 404

Post by agilalberdi » Wed Nov 21, 2018 6:22 pm

Alejo wrote:
Tue Nov 20, 2018 4:26 pm
Try this:

Code: Select all

RewriteRule ^biblioteca-empresarial/([0-9]+)-(.*) http://www.eexcellence.es/index.php/biblioteca-empresarial/$2 [R=301,L]
And clear your browser cache because previous redirects my be cached in the browser and the new rule will not work if you try with the same URLs you tested before.
Thanks Alejo, It is working perfect.


Locked

Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 3.x”