Soft Error Codes

Hi and welcome to the forum

Create your custom error pages (for example 404.html)
upload them to any dir or subdir in htdocs folder

remember the path to these files

create .htaccess file in root of htdocs folder with this content (of course edit the address)

# error redirect
ErrorDocument 400 http://yourdomain/errorpages/400.html
ErrorDocument 401 http://yourdomain/errorpages/401.html
ErrorDocument 403 http://yourdomain/errorpages/403.html
ErrorDocument 404 http://yourdomain/errorpages/404.html
ErrorDocument 503 http://yourdomain/errorpages/503.html

in my example, custom error pages are located at this address
htdocs/errorpages/

if you use https then modify http from my example to https

make sure that the address of these pages is absolute (start with http/s)
and not relative

because if is relative…
when someone comes to the subfolder of the subfolder and ask something that does not exist or does not have permission it will appear infinityfree error pages not your custom

Just don’t call your dir errors
that directory name is reserved for web servers and you cannot access any files contained within

3 Likes