Allow redirecting common HTTP codes
-
I'd like to request that we allow certain HTTP codes to be redirected to certain files if they exist:
Example:
If 404 (file not found) and my little website has a 404.html, it should use that instead of the surfer default.
-
Good idea. Do you think some convention is good enough? Like as you said if the document root contains a file of the name schema
<statucode>.htm(l)
, surfer should deliver that?This would not require any further UI and settings.
-
Good idea. Do you think some convention is good enough? Like as you said if the document root contains a file of the name schema
<statucode>.htm(l)
, surfer should deliver that?This would not require any further UI and settings.
@nebulon Yes I like that approach. Or maybe a settings page that has the ability for admins to specify a file for each status code. They can give the status code they want to redirect for and the file to redirect to.
Certain status codes should be ignored however: Specifically:- 100
- 101
- 102
- 103
- 200
- 201
- 202
- 203
- 205
- 206
- 207
- 208
- 226
Can this be accomplished with a bit of JS in the page?
No as what I am asking for happens before a page is loaded, not after.
-
This is now fixed with version 5.15.0
I only added support for 404 pages for now, since this is the only 4* error code the app would publicly serve up anyways.