Author: Derick Rethans (derickr)
Date: 2026-06-11T14:16:27+01:00

Commit: 
https://github.com/php/web-php/commit/742ae5c2269d7c6df25e2716b5d143970e4962e5
Raw diff: 
https://github.com/php/web-php/commit/742ae5c2269d7c6df25e2716b5d143970e4962e5.diff

Revert "Force base ref to www.php.net, and set it only once".

This is now fixed in the CDN configuration, so we can restore the old
behaviour.

This reverts commit f88212520ebdc5e7012e87c119cd2e0a376f460f.

Changed paths:
  M  include/header.inc


Diff:

diff --git a/include/header.inc b/include/header.inc
index 8dc0076126..48722edafa 100644
--- a/include/header.inc
+++ b/include/header.inc
@@ -61,7 +61,9 @@ if (!isset($config["languages"])) {
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
-  <base href="https://www.php.net";>
+  <?php if (!empty($_SERVER["BASE_HREF"])): ?>
+   <base href="<?php echo $_SERVER["BASE_HREF"]; ?>">
+  <?php endif ?>
 
   <title><?php echo $title ?></title>
 
@@ -103,6 +105,10 @@ if (!isset($config["languages"])) {
 <script type="text/javascript" src="/cached.php?t=<?php echo 
$modified?>&amp;f=<?php echo $filename?>"></script>
 <?php endforeach ?>
 
+<?php if (!empty($_SERVER["BASE_HREF"])): ?>
+ <base href="<?php echo $_SERVER["BASE_HREF"] ?>">
+<?php endif ?>
+
 <?php if (isset($config['meta_tags'])) { echo $config['meta_tags']; } ?>
 
 <?php if (is_primary_site()) { ?>

Reply via email to