Skip to content

Support MantisBT REST roots in MANTISBT_URL #1

Description

@shbernal

Some MantisBT installations expose the REST API through an API root such as /api/rest/index.php instead of pretty routes under /api/rest.

mantisbt-cli currently reads MANTISBT_URL, but command routes also include the /api/rest prefix. That means MANTISBT_URL can only be a web root. For an instance whose working endpoint is:

https://example.com/api/rest/index.php/users/me

there is no value that produces the correct URL today:

MANTISBT_URL=https://example.com
-> https://example.com/api/rest/users/me

MANTISBT_URL=https://example.com/api/rest
-> https://example.com/api/rest/api/rest/users/me

MANTISBT_URL=https://example.com/api/rest/index.php
-> https://example.com/api/rest/index.php/api/rest/users/me

Expected behavior: MANTISBT_URL should support both existing web-root configuration and REST API roots, including /api/rest and /api/rest/index.php, without duplicating the /api/rest path segment.

This keeps the current documented setup working while allowing deployments that require index.php in REST URLs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions