Hi
What you have to understand (but this is not about sh404SEF, it's just Joomla), is that SEF URLs are just pretty labels put on links. Joomla and all extensions only uses non-sef URLs.
An extension or joomla needs to display or redirect a URL, they build the target
as a non-sef, for instance "index.php?option=com_virtuemart&view=cart&lang=no", and then
before using it, either to be displayed or to trigger a redirect, they must pass it to a standard Joomla function called JRoute::_(), that transforms this non-sef into a SEF. The extension can simply then use the result for its purpose.
It's when Joomla or an extension calls that JRoute::_() function that sh404SEF can create a non-sef/sef pair and store it into database.
What I said earlier is that if Virtuemart is directly using "index.php?option=com_virtuemart&view=cart&lang=no" to trigger a redirect without asking Joomla (through the JRoute::_() function) to transform it into a SEF, then there's little we can do.
You tell me that the non-SEF url has been added to the database. Has it been added with a corresponding SEF url entry or is it in the db without an sef URL entry ?
As per the above, sh404SFE only adds non-sef/SEF pairs to the database.
I have a SEF cart for norwegian users: "no/din-handlekurv". This SEF url has two non-sef entries.
What are they?
I was able to see the "Add to cart" popup now, and I can absolutely confirm this to you: Virtuemart creates the links as non-sef URLs in the popup.
Normally, the "Add to cart" popup should display SEF links. That's VM responsiblity and is just an oversight on their part.
We can indeed add a
redirect from https://www.xxxx.com/index.php?option=com_virtuemart&view=cart&lang=no to https://www.xxxx.com/no/din-handlekurv
A redirect is when to tell sh404SEF: if someone requests /some-page, trigger a 301 redirect to another page.
non-sef/SEF pairs stored in the database are not redirects. They are something used internally by Joomla an extensions to build the page content.
There are 2 ways to trigger such a redirect in sh404SEF:
- Enable the "301 redirect from non-sef to SEF" option under the "Advanced" tab of sh404SEF configuration: any non-sef url request on your site will be redirected to its SEF equivalent if they exist.
- Setup a redirect just for this non-sef (index.php?option=com_virtuemart&view=cart&lang=no): you do that by adding "index.php?option=com_virtuemart&view=cart&lang=no" as an alias to "no/din-handlekurv". See
this page of documentation for background and method.
I think what you need to understand first is the difference between a redirect (browser requests one page, and joomla replies to go see another address) and a SEF URL (nice links inserted into the page instead of using the raw non-sef URL)
Rgds