Author Topic: Search Engine Friendly (SEF) Urls for Virtuemart  (Read 62173 times)

paulmason411

  • Beginner
  • *
  • Posts: 25
    • Paul Mason - Web Development Blog
Search Engine Friendly (SEF) Urls for Virtuemart
« on: June 27, 2011, 17:03:02 pm »
Hi Guys,

I've just written and released a router.php file for VirtueMart SEF URL's. You can download it and get a better explanation here:

http://paulmason.name/blog/item/search-engine-friendly-sef-urls-for-virtuemart

Please leave a comment if you have and feedback.

Cheers,
Paul

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3514
  • VirtueMart Version: 4.0.12.10777
Re: Search Engine Friendly (SEF) Urls for Virtuemart
« Reply #1 on: June 28, 2011, 21:00:51 pm »
Please could you think about adding the product id to the end of the url

This would then achieve uniqueness for items that have the same description
Regards
A

Joomla 3.10.11
php 8.0

Margaret

  • Jr. Member
  • **
  • Posts: 56
Re: Search Engine Friendly (SEF) Urls for Virtuemart
« Reply #2 on: June 29, 2011, 16:55:17 pm »
is this only for apache servers? what about lighttd servers? i have use your rooter.php but my links are still not sef

Habbakuk

  • Beginner
  • *
  • Posts: 3
    • Rolex Replica
Re: Search Engine Friendly (SEF) Urls for Virtuemart
« Reply #3 on: June 30, 2011, 06:42:33 am »
I've written my own router.php files before, wanting to create better SEO links for Virtuemart, and I've always used /product_id or /category_id, instead of just the category or product name. There are also other free SEF router files available online.

VM_Fans

  • Jr. Member
  • **
  • Posts: 251
Re: Search Engine Friendly (SEF) Urls for Virtuemart
« Reply #4 on: June 30, 2011, 13:05:58 pm »
Just to overwrite the old file?

paulmason411

  • Beginner
  • *
  • Posts: 25
    • Paul Mason - Web Development Blog
Re: Search Engine Friendly (SEF) Urls for Virtuemart
« Reply #5 on: July 02, 2011, 07:17:34 am »
Please could you think about adding the product id to the end of the url

This would then achieve uniqueness for items that have the same description

Thanks Hutson, I could add the id's in. I'll look into this.

is this only for apache servers? what about lighttd servers? i have use your rooter.php but my links are still not sef

This was written the same way as the core Joomla components, so I'm not sure if Joomla SEF works with lighttd but if so it should work.

I've written my own router.php files before, wanting to create better SEO links for Virtuemart, and I've always used /product_id or /category_id, instead of just the category or product name. There are also other free SEF router files available online.

Using an id for the URL isn't a SEF URL. Google looks at the url for keywords, so that is why you need the category and product name. Also it makes it more readable for people who bookmark, & refer the link.

Just to overwrite the old file?

I don't think VirtueMart have a router file in their standard installation but if you have added one in then it's probably best to rename the current router.php file to router_bak.php then copy it in, test it and if you are happy with the results delete the router_bak.php.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10442
  • VirtueMart Version: 3+
Re: Search Engine Friendly (SEF) Urls for Virtuemart
« Reply #6 on: July 02, 2011, 14:36:23 pm »
says that he added router.php
http://dev.virtuemart.net/projects/virtuemart/versions/13

BUT, i do not see it in my last download

paulmason411

  • Beginner
  • *
  • Posts: 25
    • Paul Mason - Web Development Blog
Re: Search Engine Friendly (SEF) Urls for Virtuemart
« Reply #7 on: July 02, 2011, 17:37:11 pm »
says that he added router.php
http://dev.virtuemart.net/projects/virtuemart/versions/13

BUT, i do not see it in my last download


I downloaded the latest version 1.9 and you can find the router file  here: VirtueMart_1.1.9-COMPLETE_PACKAGE.j15.zip\com_virtuemart_1.1.9.j15.zip\router.php

This router.php file was available a while ago as a separate download link. I've tested it out and it's a little bit messy as it converts all the querystring variables to a SEF style url, instead of keeping it neat with just the keywords  from the category and product name

paulmason411

  • Beginner
  • *
  • Posts: 25
    • Paul Mason - Web Development Blog
Re: Search Engine Friendly (SEF) Urls for Virtuemart
« Reply #8 on: July 09, 2011, 08:10:37 am »
I've just updated the router.php file. It's looking a lot more solid.

Check it out:
http://paulmason.name/blog/item/search-engine-friendly-sef-urls-for-virtuemart

Margaret

  • Jr. Member
  • **
  • Posts: 56
Re: Search Engine Friendly (SEF) Urls for Virtuemart
« Reply #9 on: July 09, 2011, 14:19:46 pm »
I would like to make this work for lighttd servers. I have to make the enable sef urls for joomla option to work with lighttd? I will make a research and post back again

paulmason411

  • Beginner
  • *
  • Posts: 25
    • Paul Mason - Web Development Blog
Re: Search Engine Friendly (SEF) Urls for Virtuemart
« Reply #10 on: July 24, 2011, 05:07:42 am »
Hi Guys,

Just wanted to let you know that after a couple of weeks of testing and a few updates, the router has graduated from it's BETA status to stable.

Please leave me any notes or feedback, I appreciate it.

Cheers,
Paul

Margaret

  • Jr. Member
  • **
  • Posts: 56
Re: Search Engine Friendly (SEF) Urls for Virtuemart
« Reply #11 on: August 02, 2011, 10:41:30 am »
we just have to put it on components/com_virtuemart/ and to enable Search Engine Friendly URLs on joomla global configuration / seo settings?

paulmason411

  • Beginner
  • *
  • Posts: 25
    • Paul Mason - Web Development Blog
Re: Search Engine Friendly (SEF) Urls for Virtuemart
« Reply #12 on: August 02, 2011, 10:46:28 am »
we just have to put it on components/com_virtuemart/ and to enable Search Engine Friendly URLs on joomla global configuration / seo settings?

Yes, that's correct!

Margaret

  • Jr. Member
  • **
  • Posts: 56
Re: Search Engine Friendly (SEF) Urls for Virtuemart
« Reply #13 on: August 02, 2011, 11:19:54 am »
in my site if i click on a category i get the correct link:
http://www.something.gr/index.php/home/%CE%A3%CF%80%CE%AF%CF%84%CE%B9--%CE%9A%CE%AE%CF%80%CE%BF%CF%82/10
but if i click on a subcategory from the menu on the left i get this
http://www.something.gr/index.php/home/%CE%A3%CF%80%CE%AF%CF%84%CE%B9--%CE%9A%CE%AE%CF%80%CE%BF%CF%82/index.php?option=com_virtuemart&page=shop.browse&category_id=48&Itemid=1
which is the previous visited category plus the current subcategory without sef
can we do something about it?

Is it possible to have the whole category path and not only home/last-subcategory?

also my banners on the right http://www.something.gr/index.php/component/banners/click/311 are not sef

paulmason411

  • Beginner
  • *
  • Posts: 25
    • Paul Mason - Web Development Blog
Re: Search Engine Friendly (SEF) Urls for Virtuemart
« Reply #14 on: August 04, 2011, 13:20:15 pm »
in my site if i click on a category i get the correct link:
http://www.something.gr/index.php/home/%CE%A3%CF%80%CE%AF%CF%84%CE%B9--%CE%9A%CE%AE%CF%80%CE%BF%CF%82/10
but if i click on a subcategory from the menu on the left i get this
http://www.something.gr/index.php/home/%CE%A3%CF%80%CE%AF%CF%84%CE%B9--%CE%9A%CE%AE%CF%80%CE%BF%CF%82/index.php?option=com_virtuemart&page=shop.browse&category_id=48&Itemid=1
which is the previous visited category plus the current subcategory without sef
can we do something about it?

I had a look a couple of days ago and I think there was a problem with the type of virtuemart menu you were using (it was rendering the links after the server had loaded). I just checked your site today and it seems like you have changed it. Let me know if you are still having problems. Cheers.