跳过导航

Learn how to fix the 404 error when viewing your WordPress login page in a secondary language. 

If your site uses NGINX and your language URL format is set to Different languages in directories, you may see a 404 error when trying to access a login or registration page in a secondary language. 

To avoid this error, you need to adjust your NGINX settings.

How can I adjust NGINX settings?

Because NGINX can’t access your htaccess file, you need to add the following rewrite rules to your NGINX settings: 

rewrite ^/xx/wp-login.php /wp-login.php break;

For example, if English, German, and French are active on your site, the NGINX rules would be:

rewrite ^/en/wp-login.php /wp-login.php break;
rewrite ^/de/wp-login.php /wp-login.php break;
rewrite ^/fr/wp-login.php /wp-login.php break;