web, "", parent::getBaseUrl()) . $this->adminUrl; } public function resolvePathInfo() { if ($this->getUrl() === $this->adminUrl) { return ""; } else { return parent::resolvePathInfo(); } } public static function getIsLocal($url) { $server_name = \Yii::$app->request->serverName; $server_name = str_replace('.', '\.', $server_name); $pattern = '/^(?:https?:\/\/)?\/?(?:www\.)?'.$server_name.'(?:\/.*)?$/'; if(preg_match($pattern, $url)) { return true; } else { return false; } } }