Category and Article ID numbers still appear in SEF URLs

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

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.
Locked
whamprod
Joomla! Intern
Joomla! Intern
Posts: 69
Joined: Tue Jun 17, 2008 9:18 pm

Category and Article ID numbers still appear in SEF URLs

Post by whamprod » Tue Sep 15, 2009 3:12 pm

I recently enabled the SEO feature in the Global Configurations panel using Apache mod_rewrite in .htaccess, and I also enabled the "Add Suffix to URLs" feature. My site has had these features turned off ever since

The problem is that the article ID still shows in the displayed URL when the article is accessed from a category list layout menu item. (When the article is linked directly in the menu, this does not happen.)

What I am seeing: domain.com/category-name/70-article-name.html

What I want to see: domain.com/category-name/article-name.html

If my menu item is a Weblink Category List Layout, clicking on the menu item will yield a URL without an ID number, but clicking on the category name in the list will yield a URL with the category ID number.

What I am seeing: domain.com/list-layout-title/category-name/40-category-name.html

What I want to see: domain.com/list-layout-title/category-name/category-name.html

If the menu item is a Section Layout, FAQ for instance, then clicking on FAQ yields a URL that looks like:
domain.com/faq.html

If I click on a category in the FAQ section list, then the URL looks like:
domain.com/faq/58-category-name.html

If I click on an article in the faq/category list, the URL looks like:
domain.com/faq/58-category-name/106-article-name.html

Does anyone have any suggestions for how I can keep those ID numbers from showing up in the URLs? Thanks in advance for any help.

User avatar
davetanguay
Joomla! Hero
Joomla! Hero
Posts: 2511
Joined: Fri Sep 22, 2006 6:21 pm
Location: Orlando, FL
Contact:

Re: Category and Article ID numbers still appear in SEF URLs

Post by davetanguay » Tue Sep 15, 2009 10:30 pm

Install sh404SEF which will allow you to customize the SEF properties.
CPanel Web Hosting Services http://interactiveonline.com/shared-web-hosting
Follow us on Twitter @interactiveo

whamprod
Joomla! Intern
Joomla! Intern
Posts: 69
Joined: Tue Jun 17, 2008 9:18 pm

Re: Category and Article ID numbers still appear in SEF URLs

Post by whamprod » Tue Sep 15, 2009 10:39 pm

davetanguay wrote:Install sh404SEF which will allow you to customize the SEF properties.
But doesn't sh404SEF require running Joomla in legacy mode? I was hoping to avoid that.

User avatar
davetanguay
Joomla! Hero
Joomla! Hero
Posts: 2511
Joined: Fri Sep 22, 2006 6:21 pm
Location: Orlando, FL
Contact:

Re: Category and Article ID numbers still appear in SEF URLs

Post by davetanguay » Tue Sep 15, 2009 11:22 pm

whamprod wrote:But doesn't sh404SEF require running Joomla in legacy mode? I was hoping to avoid that.
No, sh404SEF is 1.5 Native which doesn't require Legacy mode.
CPanel Web Hosting Services http://interactiveonline.com/shared-web-hosting
Follow us on Twitter @interactiveo

User avatar
Ghonjez
Joomla! Exemplar
Joomla! Exemplar
Posts: 8770
Joined: Sat Oct 18, 2008 3:02 am
Location: Mars
Contact:

Re: Category and Article ID numbers still appear in SEF URLs

Post by Ghonjez » Wed Sep 16, 2009 2:08 pm

Hi whamprod...

For remove article ID / category ID in URL, you can also use this plugin :
HP Router : http://extensions.joomla.org/extensions/5973/details

Hope this helps :)

whamprod
Joomla! Intern
Joomla! Intern
Posts: 69
Joined: Tue Jun 17, 2008 9:18 pm

Re: Category and Article ID numbers still appear in SEF URLs

Post by whamprod » Fri Sep 18, 2009 5:19 pm

Ghonjez wrote:Hi whamprod...

For remove article ID / category ID in URL, you can also use this plugin :
HP Router : http://extensions.joomla.org/extensions/5973/details

Hope this helps :)
That actually did the trick. Thanks very much.

User avatar
Ghonjez
Joomla! Exemplar
Joomla! Exemplar
Posts: 8770
Joined: Sat Oct 18, 2008 3:02 am
Location: Mars
Contact:

Re: Category and Article ID numbers still appear in SEF URLs

Post by Ghonjez » Fri Oct 02, 2009 1:50 am

No worries.
Glad helps you ;)

jebrunquist
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Oct 21, 2009 9:55 pm

Re: Category and Article ID numbers still appear in SEF URLs

Post by jebrunquist » Wed Oct 21, 2009 11:04 pm

Thought I could use a little help here, I'm going down whamprod's road exactly, examples and all. Here's mine:

http://www.lakeviewchurch.com/aboutus/34-board/57-home

So I installed hprouter 0.2 as many have recommended around here. It worked in that it removed the section and category ID numbers from the post, so that I'm now here:

http://www.lakeviewchurch.com/aboutus/board/home

My problem now though, is when I click the article link, I get a 404 error for each post. I've tried a few remedies, including changing the <?php echo JRoute::_( 'index.php' );?> to "index.php" in my default_form.php in components/com_contact/views/contact/tmpl/ as some have suggested, but no luck. I'm stumped, I thought maybe it might have to do with the order, but again, I'm not sure. Any advice or recommendations on what I need to do would be greatly appreciated...

whamprod
Joomla! Intern
Joomla! Intern
Posts: 69
Joined: Tue Jun 17, 2008 9:18 pm

Re: Category and Article ID numbers still appear in SEF URLs

Post by whamprod » Wed Oct 21, 2009 11:34 pm

1. install and turn on the HP Router plugin, as linked above.

2. set SE friendly URLs in global settings (make sure that you rename htaccess.txt to .htaccess in your ftp client).

3. choose "add suffix to URLs" in global settings

4. go back through your menus and change the aliases to whatever you want them to be.

EXAMPLE of what you should get: http://www.whamproductions.com

jebrunquist
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Oct 21, 2009 9:55 pm

Re: Category and Article ID numbers still appear in SEF URLs

Post by jebrunquist » Thu Oct 22, 2009 5:05 am

Hmm, thanks for the reply.

I've already completed those steps prior to my post. I'm frustrated because I'm getting the 404 after all that. I'm still trying to figure out why hprouter's changing the link to the article, but not the actual article url itself.

Looking at my prior example, the first article, http://www.lakeviewchurch.com/aboutus/34-board/57-home becomes
http://www.lakeviewchurch.com/aboutus/board/home when hprouter is active on the main page at www.lakeviewchurch.com. Which is good.

Yet
http://www.lakeviewchurch.com/aboutus/board/home is a 404 while http://www.lakeviewchurch.com/aboutus/34-board/57-home is still active.

There in lies my problem...

whamprod
Joomla! Intern
Joomla! Intern
Posts: 69
Joined: Tue Jun 17, 2008 9:18 pm

Re: Category and Article ID numbers still appear in SEF URLs

Post by whamprod » Thu Oct 22, 2009 5:35 am

jebrunquist, check your PM messages.

whamprod

gibran
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Oct 26, 2009 7:39 pm

Re: Category and Article ID numbers still appear in SEF URLs

Post by gibran » Wed Nov 11, 2009 1:14 pm

jebrunquist wrote:Hmm, thanks for the reply.

I've already completed those steps prior to my post. I'm frustrated because I'm getting the 404 after all that. I'm still trying to figure out why hprouter's changing the link to the article, but not the actual article url itself.

Looking at my prior example, the first article, http://www.lakeviewchurch.com/aboutus/34-board/57-home becomes
http://www.lakeviewchurch.com/aboutus/board/home when hprouter is active on the main page at http://www.lakeviewchurch.com. Which is good.

Yet
http://www.lakeviewchurch.com/aboutus/board/home is a 404 while http://www.lakeviewchurch.com/aboutus/34-board/57-home is still active.

There in lies my problem...
I have a very similar problem, my links work fine when accessing the articles through the menu, but when using the search or other links to the articles I get the 404. If I manually try to access the same SEF URL by including the original IDs it works. I understand the HP Router works for the basic components, so there might be my problem since I'm using FJ Related and RokAjaxSearch, so any help in adding the appropirate routers is greatly appreciated since I am not an experienced Joomla programmer/hacker, I know some basic PHP and done some very light and superficial adjustments and modifications to other components, but looking into this code I get lost.

On a similar subject, I am also interested in not just removing the IDs but hiding the category (I can keep the section, component part), so... once again, help is greatly appreciated.

Best regards,

GA


Locked

Return to “Administration 1.5”