• Support
  • It doesn't always show Error 404.

Hi,

I noticed that I don't always get Error 404.
For example, if it is a folder then Error 404 is displayed. www.somewebsite.com/folder-x/
So if the folder is Error 404 it shows, but if the file is like for example; www.somewebsite.com/some.php or www.somewebsite.com/some.html (files that do not exist) , then I don't get Error 404, I just get a message "File not found." I would like to get an Error 404 message then too.

Hello, please check whether the corresponding directory and file exist? If the file is not accessed correctly, the default access index file (index.html/index.php and other files)

aaP_knjige

    aaPanel_Kern Hello, please check whether the corresponding directory and file exist? If the file is not accessed correctly, the default access index file (index.html/index.php and other files)

    I don't know if you understood the question correctly.
    Error 404 occurs when the FOLDER does not exist and that's okay.
    What's wrong is that Error 404 doesn't come out when it's a FILE that doesn't exist, for example:
    www.somewebsite.com/some.html

    .... that file does not exist on the server and I should get Error 404 but unfortunately that is not the case, instead of Error 404 I get the message: File not found.

      aaPanel_Kern Hello, you can modify the default 404 error message or 404.html file.
      It is normal to return this response

      Is it possible that instead of the response "File not found" I get Error 404? If so, how do I do that?

        Yes, generally, if the file does not exist, it means a 404 error. Please check whether the corresponding file exists.

        aaP_knjige

        Hello, what is the web program you are using? I tested nginx, regardless of whether the directory or the file does not exist, it returns a 404 error. The file is not found.

        aaP_knjige

          Hello, apache will return 403 error if the directory does not exist. Show Permission issue
          The file does not exist will return a 404 error

          aaP_knjige

          To better understand me, I'm leaving you with a img.

          In the picture above you can see that I don't get a 404 error, but only a "File not found" message, although I should get an Error 404.

          Below I leave another image where I get a 404 error because it is a folder and not a file.

          So when it comes to a folder, Error 404 works properly, but when it comes to a file (first image), then Error 404 doesn't work, I just get a simple message "File not found".

            aaPanel_Kern Hello, this should be the error returned by your website program.

            My website program is Apache 2.4 and I know that, The question is how do I fix that?

              11 days later

              aaPanel_Kern Hello, it is recommended that you check .htacces and website programs

              When you say website program, I assume you mean Apache?

                aaPanel_Kern
                No, it has nothing to do with the 404 error, the script I use does not do anything related to 404 errors or any other error.

                The problem is that aapanel (apache) throws a 404 error when it's about a folder that doesn't exist on the server, but when it's about a file that doesn't exist on the server, such as xxxxx.php or xxxxx.html, it doesn't show error 404, but it should.
                Just show this (see image):

                  Hello, it is recommended that you check the configuration of the website. The following picture shows the content when the newly added website files and directories I tested do not exist.

                  aaP_knjige

                  8 days later