The site is unavailable

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

# error redirect
ErrorDocument 400 https://yoursubdomain/errorpages/400.html
ErrorDocument 401 https://yoursubdomain/errorpages/401.html
ErrorDocument 403 https://yoursubdomain/errorpages/403.html
ErrorDocument 404 https://yoursubdomain/errorpages/404.html

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

you can put them directly on root if that’s better for you (but then edit the path in .htaccess)

But I emphasize that the files listed in .htaccess must exist

I’m going to sleep now


I did it but it doesn’t work

I think you are editing the wrong .htaccess file in the wrong location
check again where you are on which subdomain folder (htdocs)

and please don’t unnecessarily quote every post of mine


Screenshot 2023-01-13 234043

Currently there is no problem with mixed content because infinityfree error pages also use the HTTPS protocol. And your code uses infinityfree error pages instead of your custom.

If that’s okay with you then you don’t have to read or do this below
(the only thing is that you have unnecessary files for custom error pages like 401,403,404, which you don’t use)

Files exist

But there is no content in the file (only white is visible)
so put some text inside that will let users know what the problem is.

Currently, if an address that does not exist is entered, it leads to a 404 from the infinityfree page

which means that the .htaccess from this picture contains wrong (default) instructions

and you need to edit it (via monstaFTP) and put this code (if necessary, override existing codes related to error pages)

# error redirect
ErrorDocument 401
ErrorDocument 403
ErrorDocument 404

It’s working again, thanks for your help
and have a nice day

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.