You cannot force both PHP and client resources to use the same base URL unless you use PHP for a echovariable or constant base URL on a page.
, , , URL- .
bootstrap.php:
<?php
define('BASE_URL', 'http://example.com');
index.php:
<?php
include('bootstrap.php');
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="<?php echo BASE_URL; ?>/css/styles.css" />
</head>
<body>
</body>
</html>