mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-29 01:10:42 +08:00
Fix #137 - No Api redirect with empty base directory
This commit is contained in:
parent
ca6f9f12ab
commit
7d1d113403
1 changed files with 6 additions and 1 deletions
|
@ -100,7 +100,12 @@ class LegacyApiRedirectHandler extends LegacyRedirectHandler
|
|||
$base = $_SERVER['BASE'] ?? $_SERVER['REDIRECT_BASE'] ?? '';
|
||||
|
||||
$scriptName = $base . '/legacy/' . $info['dir'] . '/' . $info['file'];
|
||||
$requestUri = str_replace($base, $base . '/legacy', $_SERVER['REQUEST_URI']);
|
||||
|
||||
if (!empty($base)) {
|
||||
$requestUri = str_replace($base, $base . '/legacy', $_SERVER['REQUEST_URI']);
|
||||
} else {
|
||||
$requestUri = '/legacy' . $_SERVER['REQUEST_URI'];
|
||||
}
|
||||
|
||||
$info['script-name'] = $scriptName;
|
||||
$info['request-uri'] = $requestUri;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue