Problem with SEO links to the component (different links to the same page).

For Joomla! 3.x Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general

Moderator: ooffick

Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
oddler
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Jun 27, 2015 9:52 am

Problem with SEO links to the component (different links to the same page).

Postby oddler » Wed May 04, 2016 1:49 pm

I made component. Through router.php customized SEO links.
In component uses the code to create links: JRoute :: _ ( 'index.php?option=com_NAME&view = categories&id_category = 100');
links are converted to /test/c/100/
/Test/ - menu alias
/C/ - view = categories
100 - id_category = 100
Everything works perfectly.

But links to this component from the other pages (other components or main page) are converted to /component/COMNAME/c/100/

Tell me, please, how can I fix it?

RayFinney
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Jun 29, 2017 8:55 am

Re: Problem with SEO links to the component (different links to the same page).

Postby RayFinney » Mon Jul 17, 2017 8:45 am

I have the same problem.
I tried already Redirect but even then i have problems with the language and the "href" url on the page is still "wrong".

Is there a way to set a view as sub-view that will replace the "component/comname"?
Or any other solution?


EDIT:

Okay i got it now...
My Solution:
While creating the URL with JROUTE i have to set the 'Itemid' manually.
To get the Itemid i have to get the menu that contains the link 'index.php?option=com_name&view=view_name' direct from the DB, to make it language safe you can also filter for the Language.

Bit odd but okay.


Return to “Joomla! 3.x Coding”

Who is online

Users browsing this forum: No registered users and 6 guests