You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+30-3
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,26 @@ This repository contains a "generic" HTTP error page. It's written in PHP/HTML a
5
5
## Features
6
6
7
7
* A single file for all 40X HTTP errors
8
-
* Background image(s) are random and selected from a "pool" of error images when an error page is accessed
8
+
* Two options for the page background -
9
+
* A background image, randomly selected from a "pool" of images.
10
+
* A moving gradient of four random colors.
9
11
* All files (*except*`.htaccess`) are kept in a single folder
10
12
* Easy to copy to a website and use. You will only need to edit the `.htaccess` file
11
13
* An option to redirect automatically to a different page
12
14
15
+
Optional Page Backgrounds:
16
+
17
+
<divalign="center">
18
+
<figure>
19
+
<!-- NOTE: When Github renders the images it will REMOVE the "margin", and ADD "max-width:100%" -->
20
+
<img src="./mdimg/sshot-bgimg.jpg" style="width:25%;border: 2px solid black;margin-right: 1rem;"; alt="Screen Shot of Error Page with an image background"/>
21
+
<img src="./mdimg/sshot-bggrad.jpg" style="width:25%;border: 2px solid black;margin-right: 1rem;"; alt="Error Page with a moving gradient background"/>
22
+
<br>
23
+
<figcaption><strong>Random Image and Random Color Gradient Background</strong></figcaption>
24
+
</figure>
25
+
</div>
26
+
<br>
27
+
13
28
# Installation
14
29
15
30
Two installation locations are possible. The first is a "local" location on an PC or NAS hosted HTTP server, and the second is on a "live" server.
@@ -30,10 +45,10 @@ At the top of `httperror.php` you find this -
30
45
31
46
```php
32
47
// uncomment for testing
33
-
//define('_DEBUG', true);
48
+
define('_DEBUG', false);
34
49
```
35
50
36
-
Uncomment the `//define('_DEBUG', true);` line and "debug" will be active. You can then load the page from the server and a `404` error will be simulated.
51
+
Change `false` to `true` and "debug" will be active. You can then load the page from the server and a `404` error will be simulated.
37
52
38
53
### Folder Junctions
39
54
@@ -123,6 +138,18 @@ To see the error page working open your browser and go to -
123
138
124
139
You should see a "400" error page.
125
140
141
+
## Changing Backgrounds
142
+
143
+
Near the top of the `httperror.php` file:
144
+
145
+
```
146
+
// can't have both!!
147
+
define('_IMG_POOL', false);
148
+
define('_GRADIENT', true);
149
+
```
150
+
151
+
Set `_IMG_POOL` or `_GRADIENT` to `true` to select that background type.
0 commit comments