Summary
Exporting an action_type=error rule to an nginx format makes it a temporary redirection to nowhere
Actual Behavior
$ wp redirection export nginx file.json --format=json
{
"id": 89,
"url": "/410",
"match_url": "/410",
"match_data": {
"source": {
"flag_query": "pass",
"flag_case": false,
"flag_trailing": false,
"flag_regex": false
}
},
"action_code": 410,
"action_type": "error",
"action_data": null,
"match_type": "url",
"regex": false,
[ … ]
},
$ wp redirection export nginx file.conf --format=nginx
Expected Behavior
location /410 {
return 410;
}
Steps to reproduce
- Set up a rule to answer with an error (4xx or 5xx) :

- Export it to an nginx file through
wp redirection export cli command
- Make nginx to load it : it doesn't complain about the missing replacement arg but it seems to just ignore the rule
Environment
Wordpress 6.5.2, Redirection 5.4.2
Summary
Exporting an
action_type=errorrule to an nginx format makes it a temporary redirection to nowhereActual Behavior
$ wp redirection export nginx file.json --format=json
{ "id": 89, "url": "/410", "match_url": "/410", "match_data": { "source": { "flag_query": "pass", "flag_case": false, "flag_trailing": false, "flag_regex": false } }, "action_code": 410, "action_type": "error", "action_data": null, "match_type": "url", "regex": false, [ … ] },$ wp redirection export nginx file.conf --format=nginx
Expected Behavior
Steps to reproduce
wp redirection exportcli commandEnvironment
Wordpress 6.5.2, Redirection 5.4.2