What is wrong with my .htaccess 404 error

0

I have created .htaccess under my public_html folder and it is like this: ErrorDocument 404 /404.php

if I type mydomain.com/random it shows the 404 error, however if I add anything else, like mydomain.com/random/texthere it shows up my site without css and not the 404 error page. Why it is doing that ?

Shnigi

Posted 2014-03-28T22:33:23.847

Reputation: 103

Are you running a Content Management System? It may have custom 404 handling . . . you could also use developer tools, firebug, etc to verify that you're getting a 404 - sounds like you're more likely getting a 200 . . . – ernie – 2014-03-28T23:04:30.717

No I am not running any content management system. I am using raspberry Pi as web server. Apache2 + php + MySQL stack. I have also installed Varnish if it has something to do with that. It is very weird problem... – Shnigi – 2014-03-31T06:59:06.967

No answers