1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Look a bit more professional, and hide all directory listings, by simulating

some REQUEST_URI for error/index.php (have all redirections at one place).
This commit is contained in:
Gabor Hojtsy
2003-01-11 13:05:40 +00:00
parent d3757924b2
commit e077cb2b21
4 changed files with 28 additions and 16 deletions

8
backend/index.php Normal file
View File

@@ -0,0 +1,8 @@
<?php
// Simulate a /backend shortcut call
include_once 'prepend.inc';
$REQUEST_URI = '/backend';
include_once "$DOCUMENT_ROOT/error/index.php";
?>

View File

@@ -1,20 +1,8 @@
<?php
// This page tries to find the manual page for "bin"
// because people can access that page by using
// http://www.php.net/bin as a REQUEST_URI
// Simulate a /bin shortcut call
include_once 'prepend.inc';
$REQUEST_URI = '/bin';
include_once "$DOCUMENT_ROOT/error/index.php";
require_once 'prepend.inc';
require_once 'manual-lookup.inc';
$file = find_manual_page(default_language(), "bin");
if ($file) {
header("Location: http://".$SERVER_NAME.$file);
exit;
}
else {
header("Location: http://".$SERVER_NAME."/");
exit;
}
?>

8
gifs/index.php Normal file
View File

@@ -0,0 +1,8 @@
<?php
// Simulate a /gifs shortcut call
include_once 'prepend.inc';
$REQUEST_URI = '/gifs';
include_once "$DOCUMENT_ROOT/error/index.php";
?>

8
logos/index.php Normal file
View File

@@ -0,0 +1,8 @@
<?php
// Simulate a /logos shortcut call
include_once 'prepend.inc';
$REQUEST_URI = '/logos';
include_once "$DOCUMENT_ROOT/error/index.php";
?>