Developer forum

Forum » Ecommerce - Standard features » Product slug in url doesn't cause 404 page

Product slug in url doesn't cause 404 page

Vincent Gercke
Reply

Hello,
This is a product page:
https://philipsonwine.com/produkter/2021-cotes-du-rhone-rose-guigal

When I visit this regular content page /om-os and add the product slug to the end of the url I would expect to get a 404 page, but instead I get the regular page, but with a ProductId in the context:
https://philipsonwine.com/om-os/2021-cotes-du-rhone-rose-guigal

Is this expected behaviour of the system or is there any way to disable this behaviour?

Thanks!!!

BR Vincent


Replies

 
Nicolai Pedersen
Reply

Hi Vincent

With the old URL providers as you are running in this solution, this is the case. If all sections of the URL ("produkter" and "2021-cotes-du-rhone-rose-guigal") can be mapped to a provider, each provider returns the resulting querystring and they do not care how you navigate. 

If you change to the new URL system, a complete URL index is being build that ensure that the entire path has to be valid and not only each section. This also makes it possible to do /product-name and /group-name in the root of the URLs etc.

BR Nicolai

 
Vincent Gercke
Reply

Hi Nicolai,

Thank you for the response! I've tried what you've suggested, but I'm still experiencing issues. 

This is a valid product page:
http://reservedele.staging.dynamicweb-cms.com/produkter/dele-til-hvidevarer/emhaette/betjeningsknap/vippeafbryder-belysning-hvid

This is a content page (with the new url provider activated) with the product slug. The page doesn't return a 404 reponse, as I would have expected:
http://reservedele.staging.dynamicweb-cms.com/kontakt-17/vippeafbryder-belysning-hvid

 

Am I missing something from your response in regards to activating the new url provider?

Thanks!

BR Vincent

 
Nicolai Pedersen
Reply

You also have to disable the old providers - otherwise both is active

 
Vincent Gercke
Reply

Thanks!! It looks like its working :-)

Have a nice weekend!

 

You must be logged in to post in the forum