I know this thread has been talked a lot on the web and here, and I tried almost all the methods, but still I'm having the same problem.
This is my url on my local server ( MAMP )
http://localhost:8888/hellothere/index.php
And I've tried to insert a wrong path to take me to wrong page , like below :
http://localhost:8888/hellothere/eiurgiuerib
Instead of taking me to Error Page it shows :
Not Found The requested URL /hellothere/eiurgiuerib was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
My 404 page is inside of the Error directory. And inside my .htaccess file I have included this :
ErrorDocument 404 /Error/404.php
To resolve this problem, use one of the following methods: Make sure that the requested resource is at the location that the URL points to. Review the URL that you open in the Web browser. Make sure that no custom filters or modules restrict access to the file that you want to browse.
The Web server returns the HTTP 404 - File not found error message when it cannot retrieve the page that was requested. The following are some common causes of this error message: The requested file has been renamed. The requested file has been moved to another location and/or deleted.
A 404 error message is a Hypertext Transfer Protocol (HTTP) status code indicating the server could not find the requested website. In other words, your web browser can connect with the server, but the specific page you're trying to access can't be reached.
The ErrorDocument
directive, when supplied a local URL path, expects the path to be fully qualified from the DocumentRoot
. In your case, this means that the actual path to the ErrorDocument
is
ErrorDocument 404 /hellothere/error/404page.html
When we apply local url, ErrorDocument directive expect the full path from DocumentRoot. There fore,
ErrorDocument 404 /yourfoldernames/errors/404.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With