Answer the question
In order to leave comments, you need to log in
.htaccess errordocument
.htaccess is in /var/www/
Probably you shouldn't post everything in it, but here's a piece of interest.
# Bad Rquest
ErrorDocument 400 /400.html
# Authorization Required
ErrorDocument 401 /401.html
# Forbidden
ErrorDocument 403 /403.html
# Not found
ErrorDocument 404 /404.php
# Method Not Allowed
ErrorDocument 405 /405.html
1. if
ErrorDocument 404 /404.php
then
Not Found
The requested URL /sfsdf was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
2. if
ErrorDocument 404 ~/404.php
then when you go to a non-existent page it gives
~/404.php
the following options were also tried
ErrorDocument 404 /error/404.php 1
ErrorDocument 404 ~/error/404.php 2
ErrorDocument 404 /www/error /404.php 1
ErrorDocument 404 /www/404.php 1
ErrorDocument 404 /var/www/error/404.php 1
ErrorDocument 404 http://'server-ip'/error/404.php 1
ErrorDocument 404 http:/ /'server ip'/www/error/ 404.php 1
what could be wrong?
Answer the question
In order to leave comments, you need to log in
created a new one with one line
ErrorDocument 404 /404.php
works
but ErrorDocument 404 /error/404.php
does not work, but I would like the 2nd option
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question