• Resolved Gemini23

    (@gemini23)


    Hi,
    When going to the SG Optimizer in the WordPress Admin area, I am getting this error message on two different websites on the same server.

    “The Rest API is disabled or broken”

    Any suggestions on what may be causing this and how to fix it?

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Dimitar Terziev

    (@dimitart)

    Hello @gemini23,

    You are experiencing this issue because the HTTP PUT requests are blocked in your .htaccess file by the 6G firewall rules:

    # 6G:[REQUEST METHOD]
    <IfModule mod_rewrite.c>
            RewriteCond %{REQUEST_METHOD} ^(connect|debug|delete|move|put|trace|track) [NC]
            RewriteRule .* - [F]
    </IfModule>

    Thus, the following plugin’s request has failed with 403 – Forbidden error:

    PUT https://www.londontheatre1.com/wp-json/siteground-settings/v1/update-settings
    Status 403 Forbidden

    I would advise you to modify the .htaccess rules of the affected sites and allow the HTTP PUT requests, such as:

    # 6G:[REQUEST METHOD]
    <IfModule mod_rewrite.c>
            RewriteCond %{REQUEST_METHOD} ^(connect|debug|delete|move|trace|track) [NC]
            RewriteRule .* - [F]
    </IfModule>

    Best Regards,
    Dimitar Terziev

    Thread Starter Gemini23

    (@gemini23)

    Hi Dimitar – that’s brilliant – MANY thanks.

    Are you also able to advise where the problem is on https://www.lastminutetheatretickets.com/

    Is it the following that needs replacing?

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    for

    # 6G:[REQUEST METHOD]
    <IfModule mod_rewrite.c>
            RewriteCond %{REQUEST_METHOD} ^(connect|debug|delete|move|trace|track) [NC]
            RewriteRule .* - [F]
    </IfModule>
    Plugin Support Dimitar Petrov

    (@demiro)

    Hello,

    Please do not replace the first listed .htaccess directives. They are required by the WordPress application for its routing.

    The newly reported issue seems different and I noticed that the application is customized. Please clear the .htaccess files, and leave only the default WordPress directives. If the issue still persists, open a ticket from your SiteGround User Area so we can investigate the case further.

    Best Regards,
    Dimitar Petrov

    Thread Starter Gemini23

    (@gemini23)

    Many thanks for your help. The first issue is now resolved. I will do as you have advised with regard to the second.

    • This reply was modified 2 years, 6 months ago by Gemini23.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘The Rest API is disabled or broken error message’ is closed to new replies.