I've recently bought a vps and setup CPanel, I have php version 7.3 installed and I have a script which redirects who enters it to another website, but the problem is that if there is html code it won't work, I've tried googling on why it happens and finding a fix which keeps the html code there and it still redirects but I couldn't manage that's why I'm here.
The same script worked on my xampp server.
The fix I found is by removing all the html code but then there is no design.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Header Test</title>
</head>
<body>
<div>Hi! this is a header test!</div>
</body>
<?php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
header("Location: https://www.testing.com/");
?>
</html>