• I have followed every instructions to activate JWT on my server i keep getting this error
    {"code":"rest_no_route","message":"No route was found matching the URL and request method","data":{"status":404}}

    For the record here is my .httaccess code

    # BEGIN WordPress
    # The directives (lines) between "BEGIN WordPress" and "END WordPress" are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    RewriteCond %{HTTP:Authorization} ^(.*)
    RewriteRule ^(.*) – [E=HTTP_AUTHORIZATION:%1]
    </IfModule>
    SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1

    my wp-config

    define('JWT_AUTH_SECRET_KEY', 'your-top-secret-key'); // Replace 'your-top-secret-key' with an actual secret key.
    define('JWT_AUTH_CORS_ENABLE', true);
    
    /* That's all, stop editing! Happy publishing. */

    Plugin has been activated.

    My Website: https://www.foodsmart.com.ng

    I need your assistance urgently.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • You need to put a real your-top-secret-key otherwise it won’t work, suggestion, use the one that is in the configuration guide

    Plugin Author Bagus

    (@contactjavas)

    Hi @drisenhope ,

    Regarding your .htaccess, I think it’s better to put the JWT Auth rules before WordPress rules.

    However, the error you show us seems like another thing. This rest_no_route used to occurs when we request to wrong/ non-existence endpoint, or.. we send request using GET to a endpoint that’s registered as POST or vice-versa.

    Have you solved this issue?

    Best,
    Bagus

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘No route was found matching the URL and request method’ is closed to new replies.