• Resolved bstnstn

    (@bstnstn)


    Hello,

    I’m encountering a problem with the plugin right now, most likely connected to a recent WordPress core update (older 5.x WP version to latest 5.7.2), i.e. the problems started after updating.

    It is no longer possible to update the 301 entries in the backend of the plugin. Clicking on the “update” buttons here does not save the updated URLs. There is the following console error message every time I try to update/save an URL:

    PUT https://www.[...].com/wp-json/simple301redirects/v1/settings 403
    
    Uncaught (in promise) Error: Request failed with status code 403

    Following the json link of the first line of the error message, it shows:

    {"code":"rest_forbidden","message":"Sorry, you are not allowed to do that.","data":{"status":401}}

    The site uses no security plugins that might block the plugin from accessing rest.

    I tried deactivating other plugins but no change.

    Any idea what might cause this problem?

    Thanks in advance,
    bstnstn

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Rafin

    (@rafinkhan)

    Hi @bstnstn,

    Can you please try logging out of your WordPress Dashboard from your Admin account and try logging in again then check back?

    Let me know how it goes, Thank you!

    Thread Starter bstnstn

    (@bstnstn)

    Hi @rafinkhan,

    thanks for the quick answer. I just tried that, but the problem persists. I also tried different browsers (Chrome, Safari) and deactivating/reactivating/re-installing the plugin. Sadly, none of it helped.

    Plugin Author Rafin

    (@rafinkhan)

    Hi @bstnstn,

    That’s strange. Can you please contact our support here

    We will have to take a look and get this resolved, thank you!

    Thread Starter bstnstn

    (@bstnstn)

    Hi @rafinkhan,

    thanks for your answer. It seems like I found the culprit for the problem in the .htaccess of the page.

    I found the problem after reading that some people solved a similar REST error after updating their .htaccess (via Settings->Permalinks->Save). That alone did not solve it for my page, but there was something else in the .htaccess that blocked REST, i.e. an older .htaccess-only-based firewall solution installed by a former developer, something I had not encountered before.
    After removing it, the plugin works again as intended! Strange, that it worked without problems before, until the core update of WP.

    The problematic .htaccess settings seemed to have been based on this open source git: https://gist.github.com/lucasjahn/758092e75a8aa01e63c2
    After removing the “6G Firewall” block, the problem disappeared.

    Plugin Author Rafin

    (@rafinkhan)

    Hi @bstnstn,

    Glad to know that you have figured out what was causing the issue. Since lots of security tools usually block REST API, we have decided to remove it altogether with today’s update and have implemented AJAX instead.

    So, please update to the latest version and let me know how it goes.

    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can’t change redirects after WP update, 403 rest_forbidden console message’ is closed to new replies.