CorefinityCorefinityDocs
Open the Control PanelControl Panel
Web server rules · 11 of 19

Get an .htaccess conversion

Answers a conversion you started on this site, with the AI's suggestions once they are ready.

GET/api/corestack/sites/{site}/nginx-rules/htaccess/{conversion}

Path parameters

siteintegerRequired

The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.

conversionstringRequired

The id of a conversion you started on this site, from its conversion.id. Format: uuid.

Returns

200 The conversion.

Fields of the 200 answer
conversionobjectRequired
Fields
aiobjectRequired

The AI model's suggestions for the lines the fixed conversion could not handle.

Fields
errorstring or null
hooksobject or null

The AI's suggested rules, per hook. Null when it made none.

linesintegerRequired

How many lines were sent.

notesarray
statusstringRequired
not_neededrunningdonefaileddisabled
unconvertedarray
convertedarray of objectsRequired

The lines that were converted, with what they became.

created_atstringRequired

Format: date-time.

expires_atstringRequired

When the conversion can no longer be read. Format: date-time.

handledarray of objectsRequired

Lines that need no rule, each with why.

Fields of each item
lineintegerRequired
linesarray of integers
reasonstringRequired
textstringRequired
hooksobjectRequired

The Nginx rules, per hook.

idstringRequired
platformstringRequired
pointersarray of objectsRequired

Lines that belong in another part of the Control Panel.

redirectsobjectRequired

The redirect lines, to import into the site's redirects.

Fields
contentstring
countinteger
formatstring
linesarray of integers
unconvertedarray of objectsRequired

Lines that could not be converted, each with why.

Fields of each item
lineintegerRequired
linesarray of integers
reasonstringRequired
textstringRequired

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
404not_foundThis conversion has expired or does not exist. Convert the file again.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl https://manage.corefinity.com/api/corestack/sites/1042/nginx-rules/htaccess/string \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "conversion": {
    "ai": {
      "error": null,
      "hooks": null,
      "lines": 0,
      "notes": [],
      "status": "not_needed",
      "unconverted": []
    },
    "converted": [],
    "created_at": "2026-11-06T09:16:40+00:00",
    "expires_at": "2026-11-06T10:16:40+00:00",
    "handled": [
      {
        "line": 1,
        "lines": [
          1
        ],
        "reason": "Not needed in nginx.",
        "text": "RewriteEngine On"
      },
      {
        "line": 3,
        "lines": [
          3
        ],
        "reason": "Already the platform default.",
        "text": "Options -Indexes"
      }
    ],
    "hooks": {
      "headers": "",
      "server": ""
    },
    "id": "6cc45fe1-46c3-4ce3-b9ca-20ab24c3bbc4",
    "platform": "wordpress",
    "pointers": [],
    "redirects": {
      "content": "Redirect 301 /old-page /new-page\n",
      "count": 1,
      "format": "apache",
      "lines": [
        2
      ]
    },
    "unconverted": [
      {
        "line": 4,
        "lines": [
          4
        ],
        "reason": "Set by Corefinity. Use CSP frame-ancestors to allow framing; browsers prefer it to X-Frame-Options.",
        "text": "Header set X-Frame-Options SAMEORIGIN"
      }
    ]
  }
}
Try it
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT