I am using .htaccess in my project, i just use the following code
ErrorDocument 404 /404.php
in the .htaccess inside the root folder, but it does not redirect to 404.php while trying to open the misspelt webpage.
I want to know whether there is syntax error in the .htaccess file.
I used .html file instead for .php file. but it throws the same error.
Not Found
The requested URL /ht/re was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
first you have to locate your errorpage
ie on local server my 404.php in root/error then
ErrorDocument 404 /error/404.php
here first slash is root of server
your server could not find 404.php thats problem so locate your 404.php
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.