Remove article id from url for joomla 3.0

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.
narendragorane
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Nov 12, 2013 7:46 am

Remove article id from url for joomla 3.0

Post by narendragorane » Wed Nov 13, 2013 5:21 am

Hi,
i want to remove article id from url, how it can be possible in joomla 3.0
Any one knows about it please tell me
Thanks.

nanjicong
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Sun Aug 04, 2013 11:41 am

Re: Remove article id from url for joomla 3.0

Post by nanjicong » Thu Nov 14, 2013 8:08 am

This was from some other site, works perfectly on Joomla 3.1.5 and 3.2.

Step 1

Joomla 3.0.2: This is the only way I got it working. If you find another way, please let us know!
Edit “components/com_content/router.php“, then continue on step 2.
Remember, you’ll probably have to re-do this step every time you update Joomla.

Step 2 (There are two places need to do this change, one near the top, one in the middle)
Replace this:

$advanced = $params->get('sef_advanced_link', 0);
With this:

$advanced = $params->get('sef_advanced_link', 1);


Step 3
You want to edit your router.php file:
- From: ->where($db->quoteName(‘alias’) . ‘ = ‘ . $db->quote($db->quote($segment)));
- To: ->where($db->quoteName(‘alias’) . ‘ = ‘ . $db->quote($segment));

fuxo
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Dec 02, 2013 11:49 am

Re: Remove article id from url for joomla 3.0

Post by fuxo » Thu Feb 06, 2014 8:40 am

nanjicong, thanks, works GREAT

User avatar
zipadyduda
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Sun Oct 10, 2010 3:49 am

Re: Remove article id from url for joomla 3.0

Post by zipadyduda » Sun Feb 09, 2014 11:24 pm

Why is this not done automatically?
It's a pain to have to remember and do this after each upgrade. It looks like the switch is there to make it a part of the admin gui.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44029
Joined: Sat Apr 05, 2008 9:58 pm

Re: Remove article id from url for joomla 3.0

Post by Webdongle » Sun Feb 09, 2014 11:30 pm

http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
zipadyduda
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Sun Oct 10, 2010 3:49 am

Re: Remove article id from url for joomla 3.0

Post by zipadyduda » Mon Feb 10, 2014 6:08 pm

That article shows how to implement the native SEF functions, which do not remove the article number from the url. If followed according to the article you get.
http://www.example.com/the-­news/1­-lat ... to­-joomla

But you need to perform the hack above to get

http://www.example.com/the-­news/latest ... to­-joomla.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44029
Joined: Sat Apr 05, 2008 9:58 pm

Re: Remove article id from url for joomla 3.0

Post by Webdongle » Mon Feb 10, 2014 9:17 pm

Just create menu items to the categories and articles
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
zipadyduda
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Sun Oct 10, 2010 3:49 am

Re: Remove article id from url for joomla 3.0

Post by zipadyduda » Tue Feb 11, 2014 1:34 pm

Just create menu items to the categories and articles
This is ok for categories, although it's a pain in the butt it does the trick, to me it's still a workaround for a function that should be built in.

And then for articles you would have to create a menu item for each and every article. not practical if you have a blog. If you have more than a dozen articles it's unmanageable.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44029
Joined: Sat Apr 05, 2008 9:58 pm

Re: Remove article id from url for joomla 3.0

Post by Webdongle » Tue Feb 11, 2014 4:24 pm

imho when a Category or Article has no menu item then only the 'Title aliases' should be used in the url and not the ID's. ID's may be needed in the code to locate the Category or Article but I see no reason to include ID's in the output of url path. Then I am not a developer. Perhaps someone with more knowledge of the code than me can request the change in the urls's ? http://docs.joomla.org/How_do_you_request_a_feature%3F
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

robertva
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Feb 25, 2014 2:58 pm
Location: Bucharest
Contact:

Re: Remove article id from url for joomla 3.0

Post by robertva » Tue Feb 25, 2014 3:03 pm

for some reason this hack doesn't work on my 3.2.2

Edit:
my bad, there are 2 lines where you have to apply step 2

L:27
L:261

(http://developernote.com/2012/05/how-to ... oomla-2-5/)

KartloInter
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Mar 12, 2014 12:51 pm

Re: Remove article id from url for joomla 3.0

Post by KartloInter » Wed Mar 12, 2014 12:59 pm

hi everyone. How to remove backslash and logo from Joomla! 3.0.2 http://intergeorgia.info/ please advice

User avatar
zipadyduda
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Sun Oct 10, 2010 3:49 am

Re: Remove article id from url for joomla 3.0

Post by zipadyduda » Sat Mar 15, 2014 12:32 am

I'm so sick of doing this after each upgrade. And if I forget, my links are broken. Why isn't this part of the core yet?

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44029
Joined: Sat Apr 05, 2008 9:58 pm

Re: Remove article id from url for joomla 3.0

Post by Webdongle » Sat Mar 15, 2014 9:11 am

http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

sortby
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Dec 17, 2013 8:23 pm

Re: Remove article id from url for joomla 3.0

Post by sortby » Wed Apr 30, 2014 1:26 am

Hello,
I have tried the method and it works.....BUT
it duplicate the urls: one with ID and another without ...like the example:
/cat/article.html
/cat/24-article.html

both are working.... >:(

I think this is very bad for SEO purpose (and i think remove the ID is mostly for SEO purpose)

So...how to solve this???

Thanks in advance!

User avatar
Josh Lewis
Joomla! Guru
Joomla! Guru
Posts: 528
Joined: Wed Jun 11, 2008 11:12 pm
Location: Lynnwood,WA
Contact:

Re: Remove article id from url for joomla 3.0

Post by Josh Lewis » Wed May 21, 2014 2:31 am

I think we are in luck: https://www.indiegogo.com/projects/adva ... outer#home

8) Can't wait until this arrives in Joomla.

IPN
Joomla! Apprentice
Joomla! Apprentice
Posts: 47
Joined: Tue May 12, 2009 12:20 am

Re: Remove article id from url for joomla 3.0

Post by IPN » Thu Jul 17, 2014 2:12 pm

Does anyone know what's the outcome of this campaign?

€4,830EUR raised of €3,500 goal 138%
This campaign started on Apr 21 and closed on May 23, 2014 (11:59pm PT).
This campaign ended on May 23, 2014

I definitely don't like using a bunch of components just to get a simple thing like this to work.

FlashRebel

Re: Remove article id from url for joomla 3.0

Post by FlashRebel » Mon Jul 28, 2014 12:19 am

Hannes started good idea how to do things better in Joomla.
Maybe Joomla can thinkg about some implementation crowdfunding and ideas by community how it was done by Hannes.
It is direct and much better way than buy T-shirt I think and support something factual.

letscodelove
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Thu Jul 31, 2014 9:41 am
Location: Pakistan
Contact:

Re: Remove article id from url for joomla 3.0

Post by letscodelove » Thu Jul 31, 2014 10:26 am

OMG wordpress is simpler. HAHA joomla users!

IPN
Joomla! Apprentice
Joomla! Apprentice
Posts: 47
Joined: Tue May 12, 2009 12:20 am

Re: Remove article id from url for joomla 3.0

Post by IPN » Thu Jul 31, 2014 2:03 pm

letscodelove wrote:OMG wordpress is simpler. HAHA joomla users!
So why are you trolling Joomla? Looking for something better? :)

nanjicong
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Sun Aug 04, 2013 11:41 am

Re: Remove article id from url for joomla 3.0

Post by nanjicong » Thu Jul 31, 2014 10:36 pm

letscodelove wrote:OMG wordpress is simpler. HAHA joomla users!
WP also has many silly settings.

User avatar
sounds
Joomla! Explorer
Joomla! Explorer
Posts: 357
Joined: Tue Jun 12, 2007 7:20 am
Location: Republic of Ireland

Re: Remove article id from url for joomla 3.0

Post by sounds » Sat Sep 06, 2014 4:53 am

The first 2 steps worked for me, the 3rd step gave me an error.
Parse error: syntax error, unexpected '=' in /home/site/public_html/components/com_content/router.php on line 426
Big party when I reach 10,000 posts.

Thank you :pop:

IPN
Joomla! Apprentice
Joomla! Apprentice
Posts: 47
Joined: Tue May 12, 2009 12:20 am

Re: Remove article id from url for joomla 3.0

Post by IPN » Sat Sep 06, 2014 1:44 pm

It will work, that's not the issue. The problem is when there's an update, you'll have to keep modifying the files as they're overwritten.

User avatar
sounds
Joomla! Explorer
Joomla! Explorer
Posts: 357
Joined: Tue Jun 12, 2007 7:20 am
Location: Republic of Ireland

Re: Remove article id from url for joomla 3.0

Post by sounds » Sat Sep 06, 2014 1:48 pm

Waste of time then, really stupid to have urls with ids anyway
Big party when I reach 10,000 posts.

Thank you :pop:

User avatar
rich1
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 190
Joined: Sun Apr 05, 2009 2:17 am
Location: London SE
Contact:

Re: Remove article id from url for joomla 3.0

Post by rich1 » Sun Sep 07, 2014 2:36 pm

You can always install K2 it has a function to eliminate id's in parameters.
It does say it is not wise if over 100 articles.
For those that are not constant bloggers it works well and even detects those K2 urls from search engines with the old ID's.
Then you can stop using Joomla Article Manager and have clean SEF URL's.
Something Joomla does not seem too concerned with.
If you have no 'Coeur de Lion' do not ask why you fail.

FlashRebel

Re: Remove article id from url for joomla 3.0

Post by FlashRebel » Sun Sep 07, 2014 2:46 pm

Also it depends how many article you will handle. If its not so many, the easiest way is create menu item for every article, then you can have any url you want.
if you would like to blogging, then probably curently the best blog extension for Joomla is Easy Blog with nice editor and user interface.

IPN
Joomla! Apprentice
Joomla! Apprentice
Posts: 47
Joined: Tue May 12, 2009 12:20 am

Re: Remove article id from url for joomla 3.0

Post by IPN » Sun Sep 07, 2014 3:34 pm

FlashRebel wrote:Also it depends how many article you will handle. If its not so many, the easiest way is create menu item for every article, then you can have any url you want.
if you would like to blogging, then probably curently the best blog extension for Joomla is Easy Blog with nice editor and user interface.
True, but who really wants to create a menu item for each article.

FlashRebel

Re: Remove article id from url for joomla 3.0

Post by FlashRebel » Sun Sep 07, 2014 3:54 pm

IPN wrote:True, but who really wants to create a menu item for each article.
I do that, prefer some work and have excellent website instead of look at crapy urls and sooner or later fight with them and redirect tons of links.
Create menu item takes few seconds.
Sure, its not solution for every website and everybody.

IPN
Joomla! Apprentice
Joomla! Apprentice
Posts: 47
Joined: Tue May 12, 2009 12:20 am

Re: Remove article id from url for joomla 3.0

Post by IPN » Sun Sep 07, 2014 4:59 pm

FlashRebel wrote:
IPN wrote:True, but who really wants to create a menu item for each article.
I do that, prefer some work and have excellent website instead of look at crapy urls and sooner or later fight with them and redirect tons of links.
Create menu item takes few seconds.
That works fine with a few links. To do this is simply ludicrous for hundreds of articles.

FlashRebel

Re: Remove article id from url for joomla 3.0

Post by FlashRebel » Sun Sep 07, 2014 5:46 pm

Joomla is not excellent with urls, but with some work it can be fixed ... you can use some blog component how I mentioned above or also some SEF component or any other bloated staff :)

When I look at some component for my needs, on very beginning I check how it handle urls, if its not well for me, then go away. Even good component with well functionality is for nothing, if I have trouble with basic - in this case urls.

User avatar
sounds
Joomla! Explorer
Joomla! Explorer
Posts: 357
Joined: Tue Jun 12, 2007 7:20 am
Location: Republic of Ireland

Re: Remove article id from url for joomla 3.0

Post by sounds » Sun Sep 07, 2014 9:03 pm

It wasn't like that before, i have several sites, upgraded to the latest version, and none of the urls have these stupid numbers, what's the point, people that want to get back to one of your pages have to remember the full url which they won't. unless it's short and sweet. But nobody really memories urls.
But I don't really wanna learn another content manager to have nicer urls.
I thought about using wordpress but I'm so use to joomla now.
Last edited by sounds on Sun Sep 07, 2014 9:09 pm, edited 1 time in total.
Big party when I reach 10,000 posts.

Thank you :pop:


Locked

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