The below is my .htaccess
file placed in the root
ErrorDocument 404 http://www.abc.com/404.php Redirect /services/something.php http://www.abc.com/index.php
The second line is irrelevant I guess.
The problem is that it redirects any non existent file to my 404.php perfectly when I run it in my local WAMP server. But with the same is not happening when I upload it to my server. What could be wrong?
Also, if I write
ErrorDocument 404 /404.php
instead of ErrorDocument 404 http://www.abc.com/404.php
it won't even work in the localhost.
I get the error message saying
The requested URL /abc/xxxx was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Why does this error occur when every website I refer has recommended
ErrorDocument 404 /404.php