<?php

$server_name = $_SERVER["SERVER_NAME"];

if($server_name == "localhost"){
    $repo_name = explode("/",$_SERVER["PHP_SELF"])[1];
    $url = $base = "https://".$server_name."/".$repo_name."/";
}else{
    $url = $base = "https://".$server_name."/";
    $repo_name = null;
}