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:
8
backend/index.php
Normal file
8
backend/index.php
Normal 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";
|
||||
|
||||
?>
|
||||
@@ -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
8
gifs/index.php
Normal 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
8
logos/index.php
Normal 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";
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user