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
htdocs/errorpages/

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

3 Likes

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

5 Likes

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
proof https://community-georgios.great-site.net/404.html

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
example https://community-georgios.great-site.net/nothing

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

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 https://community-georgios.great-site.net/401.html
ErrorDocument 403 https://community-georgios.great-site.net/403.html
ErrorDocument 404 https://community-georgios.great-site.net/404.html
4 Likes

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.