mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 21:35:56 +00:00
config::make_self_url() strip index.php etc
This commit is contained in:
@@ -284,6 +284,8 @@ class Config {
|
|||||||
$proto = self::is_server_https() ? 'https' : 'http';
|
$proto = self::is_server_https() ? 'https' : 'http';
|
||||||
$self_url_path = $proto . '://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
|
$self_url_path = $proto . '://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
|
||||||
|
|
||||||
|
$self_url_path = preg_replace("/\w+\.php$/", "", $self_url_path);
|
||||||
|
|
||||||
if (substr($self_url_path, -1) === "/") {
|
if (substr($self_url_path, -1) === "/") {
|
||||||
return substr($self_url_path, 0, -1);
|
return substr($self_url_path, 0, -1);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user