My virtuemart redirects to index.php?option=com_virtuemart instead of showing an error page for incorrect urls.
How can this be changed?
"Search Engine Friendly URLs" and "Use URL rewriting" set to Yes.
PHP: 5.3.25
Joomla!: Joomla! 2.5.11
VM: 2.0.20b
...because VirtueMart urls are foolproof ;D. Instead of throwing an error, VM usually displays what it finds in the correct part of the url, i.e. the category view. To see that, just go to a product view in the frontend and replace the last word(s) in your url with some nonsense, i.e. ...testurl. So instead of a 404, your customers will probably see a page where they can find what they were looking for with just another mouse click.
A normal non-sef url looks like this:
...option=com_virtuemart&view=productdetails&virtuemart_product_id=1391&virtuemart_category_id=6
A normal sef url looks like this:
...YourDomain/CategoryName/ProductTitle-detail (or -html, if you change the setting)
The recommended SEF settings are
In Joomla configuration set:
'Search Engine Friendly URLs' = "Yes"
'Adds Suffix to URL' to "No"
In VM2 configuration, set
'SEO Disabled' to "Off" (= unchecked)
'Seo Suffix' to "-detail" (or "shop" or "htm" or whatever you want). DO NOT leave this field empty. Otherwise switching between categories and products will frequently fail.
'Translate Strings' = "Yes" (checked)
'Use Product and Category IDs' = "Off" (unchecked)
BTW - if you change SEF settings, you will normally have to clear your Joomla and browser cache to pick up the changed settings.
Since you have an index.php? in your url, please also read this:
http://forum.virtuemart.net/index.php?topic=106167.msg354064#msg354064 (http://forum.virtuemart.net/index.php?topic=106167.msg354064#msg354064)
Thanks, yes I've noticed sometimes you endup in the correct place even thought the url is not completly correct. And I see after playing around abit that sometimes a 404 is shown. For SEO I suspect its a good thing to return 404 for wrong urls, isnt it?
But my problem is I need a way to redirect an url that vm just redirects to the above adress. And I belive I have all the correct settings. So thought I would do it by using the Joomla redirect manager but it appears not to be working well with the VM urls (cant see any in the "Expired URL" list).
Whats the best way of handling wrong urls in VM?
Is 'motivuppsala' your shop? I just had a look at that one, but can't reproduce any redirect to 'index.php?option=com_virtuemart'. Maybe you renamed your htaccess.txt to .htaccess meanwhile?
Thats strange, seems I can type in anything wrong and end up in index.php?option=com_virtuemart..?
I don't have no other clue at the moment. When I type some garbarge into my browser's url field on my own website or on a fresh Joomla/VirtueMart test site, VM redirects me to the next higher menu level, which usually is the category view. However, search engine crawlers dont' type wrong urls, so it won't affect your SEO.
category-name/product_name-detail
IF you do this category-name/product_nam999999999999999999999888888888888888e-detail
It will redirect to
category-name/
IF, you have
shop/product-name-detail
and there is no product, it will go to /shop
i just checked & cannot reproduce the problem,
I have the same.
try:
www.lichtengeluigkopen.nl/werdf
and you go to
www.lichtengeluidkopen.nl/index.php?option=com_virtuemart
Quote from: r_ekkie on June 15, 2013, 06:47:40 AM
I have the same.
try:
www.lichtengeluigkopen.nl/werdf
and you go to
www.lichtengeluidkopen.nl/index.php?option=com_virtuemart
do you have a menu link to the shop?
just www.lichtengeluidkopen.nl
Quote from: r_ekkie on June 15, 2013, 16:35:40 PM
just www.lichtengeluidkopen.nl
is it to the "frontpage" ?
uhm, don't understand your question.
Quote from: PRO on June 15, 2013, 02:28:13 AM
i just checked & cannot reproduce the problem,
If you click any of the categories at www.lichtengeluidkopen.nl, then delete i.e. the last character of the category name in the url and press enter, you will probably see http://www.lichtengeluidkopen.nl/index.php?option=com_virtuemart. But I don't see why this should create any problem.
you get an empty page customers don't get that, I think it should give a 404 or the main categorie view of VM
I don't see an empty page. If I do what I described in my previous answer, I see a search form, so a customer (they ususally don't type product urls) can use the form to search what he was looking for instead of a 404 error, which doesn't help the customer.
Ok understand your way of view. but is there then a way of displaying a message sorry try searching again?
I was just thinking that it might be possible to use two differently designed search modules, of which one could display a "Sorry..." message. However, I just noticed that I can reproduce that behaviour on my live website, which is using VM 2.0.20b. But on my local test site with the latest SVN version (almost the same as 2.0.20d) I never get the .../index.php?option=com_virtuemart. Instead the system switches to the normal homepage and displays the normal homepage url. Which VM layout did you assign to your 'Home' menu item - Categories layout or Frontpage? You could try if it makes a difference.
jjk,
changed is to frontpage now. That solves the issue. No mather what I type behind the url I go to a page with all the categories.
Also have a "front page" link, but instead go to the index.php?option=com_virtuemart for wrong urls.
Seems a bad idea for SEO and cant use the joomla redirect component