Changeset 245 for vhosts/server.php


Ignore:
Timestamp:
Mar 27, 2007, 2:43:26 PM (17 years ago)
Author:
andersk
Message:
Give 404s for unknown vhosts.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • vhosts/server.php

    r242 r245  
    4747        if (count($settings) >= 1 && '' != trim($settings[1])) $baseHTTP = trim($settings[1]);
    4848        if (count($settings) >= 2 && '' != trim($settings[2])) $baseHTTPS = trim($settings[2]);
     49} else {
     50        header ("HTTP/1.0 404 Not Found");
     51?>
     52<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
     53<html><head>
     54<title>404 Not Found</title>
     55</head><body>
     56<h1>Not Found</h1>
     57<p>The requested URL <?=htmlspecialchars($req)?> was not found on this server.</p>
     58</body></html>
     59<?
     60        exit;
    4961}
    5062
Note: See TracChangeset for help on using the changeset viewer.