• Debian 11 has reached its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.81 is the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Nginx with custom permalinks - Wp-login.php - Too many redirects

Xavier12

Regular Pleskian
Hey guys,

For some reason we are having nginx issues. We've used apache to nginx converter and custom permalinks do work, however, when logging in to Wordpress dashboard, we receive a "too many redirects" error. It seems to only work when we type in: http://domain.com/wp-admin/index.php

Code:
#ignored: "-" thing used or unknown variable in regex/rew

if (!-f $request_filename){
    set $rule_1 1$rule_1;
}
if (!-d $request_filename){
    set $rule_1 2$rule_1;
}
if ($rule_1 = "21"){
    rewrite /. /index.php last;
}

Please advise, thanks.
 
What worked for my was adding a rule specifically targeting the /wp-admin folder

#ignored: "-" thing used or unknown variable in regex/rew

if (!-f $request_filename){
set $rule_1 1$rule_1;
}
if (!-d $request_filename){
set $rule_1 2$rule_1;
}
if ($rule_1 = "21"){

rewrite ^/wp-admin/(.*)\.php$ /wp-admin/$1.php last; #<==== this line

rewrite /. /index.php last;

}
 
Back
Top