I have a product with a SKU that looks like this: "0/000.150.2010" So naturally, when I try to update said product: https://URL.com/index.php/rest/da/V1/products/0/000.150.2010 I get a "message": "Request does not match any route." error.

Encoding the parameter, gives a HTML page with a 404 status. https://URL.com/index.php/rest/da/V1/products/0%2F000.150.2010

Now, I've looked at How to get Magento2 product with REST if sku has slash? and was wondering if there has been any update to a built-in workaround, considering it's a bit old?

1 Answer 1


Magento supports slashes in the API but if using Apache2 the conf file for the virtual host must contain the line AllowEncodedSlashes NoDecode

If using varnish with apache2 to offload SSL then the conf file for that virtual host must also contain the line AllowEncodedSlashes NoDecode AND the proxy pass line should have the nocanon argument, eg: ProxyPass / http://x.x.x.x:81/ nocanon

This is tested and working on Magento 2.4.5-p1 with apache 2.4.18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.