Keyword

K2 SEO issue - Can it be fixed?

More
11 years 8 months ago - 11 years 8 months ago #61322 by chilly_bang
Replied by chilly_bang on topic Re: K2 SEO issue - Can it be fixed?
@Matt: free means developers must nothing do. They can, but must not. Just the same the community: can help, must not. The user can use free product, but only like it is, without waiting for anything from anybody. There are 3 possibilities: 1. you use it and can code - win, 2. you use it and can't code - if troubles, you must find somebody, who can code and pay for support or fail, 3. you don't use it, but other, payed extention with included support. All other possibilities are not clear, cause you can only hope, that all works or something helps. If your project must earn money, i would not advice to use K2 without good to know, what to do, if something doesn't work like expected.

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #61323 by Michelle
Replied by Michelle on topic Re: K2 SEO issue - Can it be fixed?
Chilly,

I tried inserting your hack but nothing changed. I'm not very good at this type of thing. Is there somewhere specific within the category item php file where I should insert the hack? Thanks for the help. This entire thing is extremely frustrating with the duplicate links.

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #61324 by Yiannis K
Replied by Yiannis K on topic Re: K2 SEO issue - Can it be fixed?

chilly_bang wrote: Hi all!

Here the hack to avoid duplicated URLs

For an item:
take the file: components/com_k2/templates/default/item.php from your K2 template. Add

<?php 
if ($this->item->link!= JRequest::getURI()) JApplication::redirect($this->item->link,'','' ,true); 
?>
For a category:
take the file
components/com_k2/templates/default/category_item.php from your K2 template. Add
<?php
$this->original_link = JRoute::_(K2HelperRoute::getCategoryRoute(JRequest::getVar('id'), 
0)); 
if (JRequest::getInt('start') > 0) $this->original_link .= "?start=" . JRequest::getVar('start'); 
$this->real_link = JRequest::getURI(); 
if ($this->original_link != $this->real_link) JApplication::redirect($this->original_link,'','' ,true);
?>

The hack will redirect all duplicated urls to the single right one.

Use at your own risc and remember:
with this hack no parameter can be pushed with any url. Your print pages etc will not work anymore (print page will be loaded WITH template).


I couldn't use multiple categories in menu. Returned a 404 error, so I had to remove the categories hack at least..

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #61325 by Creative Immense
Replied by Creative Immense on topic Re: K2 SEO issue - Can it be fixed?
Hello Yiannis K,

The hack to avoid duplicated URLs from Chilly_bang is working but I still have the item id number in the link.
Is there someone who knows how to remove the item id from the link.
I have for example: http://www.yoursite,com/item/16-joomla-k2-problem-item-id.html but I want it like this http://www.yoursite,com/item/joomla-k2-problem-item-id.html without the item id number.
Please can someone help me?!

Greetings Mike

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #61326 by Creative Immense
Replied by Creative Immense on topic Re: K2 SEO issue - Can it be fixed?
Hello everybody,

New k2 update and the SEO problem is fixed!!
Everthing works great! Good work k2! :-)

Greetings Mike

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #61327 by Ganesamoorthy N
Replied by Ganesamoorthy N on topic Re: K2 SEO issue - Can it be fixed?

Mike wrote: Hello everybody,

New k2 update and the SEO problem is fixed!!
Everthing works great! Good work k2! :-)

Greetings Mike


Could you please mention the version of k2, because i have same issues with the version 2.6.3

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #61328 by Creative Immense
Replied by Creative Immense on topic Re: K2 SEO issue - Can it be fixed?
Hi Ganesamoorthy,

K2 v2.6.5 but I still have the SEO problem. So I put the fix back in the item.php

Greetings Mike

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago - 11 years 6 months ago #61329 by Neil Forrester
Replied by Neil Forrester on topic Re: K2 SEO issue - Can it be fixed?
Hi Mike,

I have been looking into this issue myself and even went down the route of employing someone in htaccess coding skills to rewrite the URL.

After spending too many hours on this I now have it working.

  1. Back up your site using Akeeba Backup
  2. Download the latest version of K2 which is currently K2_v2.6.5.zip.
  3. Remember, if you have made any changes to the K2 CSS files without creating an override they will be written over. So keep any necessary files.
  4. Install K2_v2.6.5.zip via Extensions Manager
  5. Now go to Components / K2
  6. Click the Parameters button top right
  7. A window opens up - click the Advanced tab
  8. Scroll down to Advanced SEF Settings
  9. Enable advanced SEF for K2 URL's - Yes
  10. Use the item ID in the URL - No

[img size=74kb]www.pixelfire.com.au/images/k2-sef-settings.png[/img]

Save and close.

These settings have worked for me. I wish I had only upgraded my K2 before spending too many bloody hours on this issue. Oh well - it's working fine now and it's great.

Don't forget, if you have a few Items that people access through a category listing you will need to update the redirects for their URL's which I now need to do so I'll have to disable the new SEF until I have a full list of redirects I need to set up.

Example URL change:
www.pixelfire.com.au/website-and-graphic-design-blog/item/121-top-10-joomla-extensions

Now becomes:
www.pixelfire.com.au/website-and-graphic-design-blog/top-10-joomla-extensions

Also this guy at the bottom of this URL has some good ideas for avoiding duplication of URL using the No Numbers Sourcerer and the rel="canonical" tag. It's worth a look.
forum.joomla.org/viewtopic.php?t=624631

Hope that helps.

Cheers,
Neil.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #61330 by Neil Forrester
Replied by Neil Forrester on topic Re: K2 SEO issue - Can it be fixed?
I have written an in depth article on how to address the URL issue as well as avoiding any duplication of content. Please see my link:

www.pixelfire.com.au/website-and-graphic-design-blog/item/122-how-to-remove-item-and-item-id-from-a-k2-url

I hope this helps all of you :)

Good luck.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #61331 by Passy
Replied by Passy on topic Re: K2 SEO issue - Can it be fixed?
Hi,

How can remove component/k2/ from my URL

For example:
www.domain.de/component/k2/article

to

www.domain.de/article


Thank you for your help :-)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum