Product SiteDocumentation Site

5.3. Path

These path settings are important for proper linking within MantisBT. In most scenarios the default values should work fine, and you should not need to override them.
$g_path
Full URL to your installation as seen from the web browser.
This is what users type into the URL field, e.g. https://www.example.com/mantisbt/. Requires trailing `/`.
If not set, MantisBT will default this to a working URL valid for most installations. However, in some cases (typically when an installation can be accessed by multiple URLs, e.g. internal vs external), it might be necessary to override the default.

Warning

The default is built based on headers from the HTTP request. This is a potential security risk, as the system will be exposed to Host Header injection attacks, so it is strongly recommended to initialize this in config_inc.php.
$g_short_path
Short web path without the domain name. This requires the trailing '/'.
$g_absolute_path
This is the absolute file system path to the MantisBT installation, it is defaulted to the directory where config_defaults_inc.php resides. Requires trailing '/' character (eg. '/usr/apache/htdocs/mantisbt/').
$g_core_path
This is the path to the core directory of your installation. The default value is usually OK but it is recommended that you move the 'core' directory out of your webroot. Requires trailing DIRECTORY_SEPARATOR character.
$g_class_path
This is the path to the classes directory which is a sub-directory of core by default. The default value is typically OK. Requires trailing DIRECTORY_SEPARATOR. character.
$g_library_path
This is the path to the library directory of your installation. The default value is usually OK but it is recommended that you move the 'library' directory out of your webroot. Requires trailing DIRECTORY_SEPARATOR character.
$g_vendor_path
Path to vendor folder for 3rd party libraries. Requires trailing DIRECTORY_SEPARATOR character.
$g_language_path
This is the path to the language directory of your installation. The default value is usually OK but it is recommended that you move the 'language' directory out of your webroot. Requires trailing DIRECTORY_SEPARATOR character.
$g_manual_url
This is the url to the MantisBT online manual. Requires trailing '/' character.