VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: ExSpirit on February 11, 2016, 13:21:54 PM

Title: SEF URL problem at subcategory
Post by: ExSpirit on February 11, 2016, 13:21:54 PM
I am using (on latest VM/Joomla) categories and subcategories and I have problem with SEF URLs at subcategories (if it doesn't exist).

For example:

- If I use www.domain.com/some-text: 404 is returned (this is OK)
- If I use www.domain.com/maincategory/product-does-not-exist.html: 404 is returned (this is OK)
- If I use www.domain.com/maincategory/subcategory-does-not-exist/: 200 is returned and main category is shown (this is not OK)

What can I do so that last example will return as 404, since that subcategory doesn't exist?
Title: Re: SEF URL problem at subcategory
Post by: PRO on February 11, 2016, 22:29:01 PM
are you using joomla menu system for links?

do you have virtuemart 404 error handing turned on?

for the most part, if that category does not exist, it will show the parent. BUT will also have the correct Canonical url.

Title: Re: SEF URL problem at subcategory
Post by: ExSpirit on February 12, 2016, 06:43:12 AM
I am using joomla menu system for links.
Virtuemart 404 error handing is turned on.

Title: Re: SEF URL problem at subcategory
Post by: PRO on February 15, 2016, 19:09:23 PM
is your site new? or has it been existing for a while?

reason I say is.
If you turn off vmart 404 handling, which would fix it, any other 404 would have to be redirected with the redirect component.

SO
like with all things SEO related, you really need to think about it. plan it out etc.

Title: Re: SEF URL problem at subcategory
Post by: ExSpirit on February 15, 2016, 20:43:36 PM
My site has been up for a few months now.

I have now turned off vmart 404 handling but there's no difference, the problem remains the same.
Title: Re: SEF URL problem at subcategory
Post by: PRO on February 15, 2016, 21:34:50 PM
ok, sorry. I just checked, and it is the same with mine.

is this really a big problem?

for the user, they get the main category, which is useful

for google, it gets the canonical url for the main category.

do you get these from deleted categories?