servnest/http-errors/index.php

9 lines
218 B
PHP

<?php
http_response_code(404);
if (filter_var(str_replace(['[', ']'], '', $_SERVER['HTTP_HOST']), FILTER_VALIDATE_IP))
echo file_get_contents('default-ip.html');
else
echo file_get_contents('default-domain.html');