Redirection by language in Wordpress from a non-existent url

r1004

Regular Member
Joined
Sep 28, 2018
Messages
265
Reaction score
30
Redirection by language in Wordpress from a non-existent url


Suppose I have a shoe store.

The shoe store is in 5 languages because we are cool and we sell all over the world.

Now suppose I run a Facebook ads campaign.

And in the campaign, since I'm lazy, I only want to put a single link to the payment platform.

The url would be: www.coolshoes.com/BUY-SHOE/


This url does not exist on my website, that is: www.zapatosguays.com/BUY-SHOE/ ---> it does not exist.

And I want it to detect the language of the browser and go according to the language to:

www.coolshoes.com/es/BUY-SHOE/
www.coolshoes.com/de/BUY-SHOE/
www.coolshoes.com/en/BUY-SHOE/
www.coolshoes.com/fr/BUY-SHOE/
www.coolshoes.com/ne/BUY-SHOE/

and I just want you to redirect me to this url that does not exist: www.coolshoes.com/BUY-SHOE/

the rest of the website as it is.


HOW IS IT DONE IN WORDPRESS?

NOTE: I dont want a lang redirect in all website, just in the inexistance url www.zapatosguays.com/BUY-SHOE/


Thank you
 
Redirection by language in Wordpress from a non-existent url


Suppose I have a shoe store.

The shoe store is in 5 languages because we are cool and we sell all over the world.

Now suppose I run a Facebook ads campaign.

And in the campaign, since I'm lazy, I only want to put a single link to the payment platform.

The url would be: www.coolshoes.com/BUY-SHOE/


This url does not exist on my website, that is: www.zapatosguays.com/BUY-SHOE/ ---> it does not exist.

And I want it to detect the language of the browser and go according to the language to:

www.coolshoes.com/es/BUY-SHOE/
www.coolshoes.com/de/BUY-SHOE/
www.coolshoes.com/en/BUY-SHOE/
www.coolshoes.com/fr/BUY-SHOE/
www.coolshoes.com/ne/BUY-SHOE/

and I just want you to redirect me to this url that does not exist: www.coolshoes.com/BUY-SHOE/

the rest of the website as it is.


HOW IS IT DONE IN WORDPRESS?

NOTE: I dont want a lang redirect in all website, just in the inexistance url www.zapatosguays.com/BUY-SHOE/


Thank you

You can use WPML auto-redirect for this:
https://wpml.org/documentation/gett...automatic-redirect-based-on-browser-language/

Or use a plugin like this:
https://codecanyon.net/item/wpml-redirect-based-on-ip-country/18074869
https://wordpress.org/plugins/ip2location-redirection/
 
Back
Top