How to redirect URL with language prefix to the same URL with no prefix (default language) I have installed i18n module so two languages Japanese and English are available. I have set Japanese to the default language and also "language Language negotiation" to "path prefix only". So all the URL without language prefix show the Japanese pages and English pages with the prefix of "en".

What I want to do is to redirect some of URL with prefix to the same URL without prefix as I need to make some of the pages available only in Japanese. For example, when a user is trying to view my-site.com/en/cart the user is automatically redirected to my-site.com/cart as I want to make the my-site.com/en/cart unavailable. 

I have tried path redirect  but the redirect doesn't work though I set two cases as below


"Language" to "All languages " ,"From" to "my-site.com/en/cart" and "To" to "my-site.com/cart". 
"Language" to "English" ,"From" to "my-site.com/en/cart" and "To" to "my-site.com/cart".
The below answer requires that at least part of your website is using Page Manager + Panels. In my opinion, they should anyway, but others will disagree.
Both of these modules are tools, as opposed to solutions, so this answer will require that you research and understand these two modules. Link to excellent video tutorial. At the time of writing, this requires the -dev version of Ctools.

At the time of writing, this Ctools patch must be applied for the following instructions to work.


Ensure that the page you want to redirect from, is managed by Page Manager. This page will have 2 variants.
Add a "HTTP response" variant, with a 301 response to cart. More details on this step in another question. It's important that this variant is the topmost one. You can reorder them afterwards, if need be.
On the HTTP variant, go to the "Context" tab on the left side, add a "Language" context, selecting "Current language".
Go to the "Selection rule", and add a "User:Language" == "English".
Add a second variant, this time a Panels variant.
In the second variant, add all the content that you wish to be part of the Japanse page.