1

I am developing multilingual site in Drupal 8. I added content in Turkish language and did not create any translation for that node.

Suppose node ID is 123, so system URL is http://example.com/tr/node/123. I have managed to redirect the system URL to its alias. So when I go to https://example.com/tr/node/123 I am successfully redirected to https://example.com/tr/custom-node-in-turkish which is perfect.

The problem now is, when I go to https://example.com/node/123 (without tr) or add another language http://example.com/ar/node/123 (ar = Arabic) then I want to redirect the user to the 404 page as these are not the original content.

How can I achieve that in Drupal 8?

0

You could redirect 301 the specific node id's to 404 using .htaccess file

Redirect 301 /ar/node/123 /page-not-found

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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