On specific categories (not all of them), when switching between store views for products, I am getting 403 Forbidden (Nginx). This only happens for products, not categories.
Following the debugging process, I found out that the problem comes from the “uenc” parameter (vendor/magento/module-store/App/Response/Redirect.php > _getUrl() method) which is not returning the correct url_key, but something like this: “/.html” instead of “/blue-shirt.html”.
For generating the URL rewrites I use the module provided by OlegKoval, but I got the same result with every other module. However, when no URL rewrite is generated and the link has the default structure (e.g. catalog/product/view/3231/category/23), everything works just fine.
What is causing this problem?