Currently I made a php file that redirects to the home page; then i made a .htaccess page that if its a 404 error code it's suppose to load the new page using this...
However it doesnt redirect. It just says 404.phpCode:ErrorDocument 404 404.php
Printable View
Currently I made a php file that redirects to the home page; then i made a .htaccess page that if its a 404 error code it's suppose to load the new page using this...
However it doesnt redirect. It just says 404.phpCode:ErrorDocument 404 404.php
Is the path correct? Also, you may need to quote 404.php and/or terminate the line somehow (semi-colon I would guess). A preceding / slash may be needed. These files can be very tricky as far as the syntax goes, varying on different servers even. That is to say there could be other syntax issue(s) and those I mentioned might not apply.
See also:
http://www.javascriptkit.com/howto/htaccess2.shtml
Yeah i did try all that
"/404.php"
/404.php
and "404.php"
Nothing works still (Im running it from localhost.)
I just tried on my localhost and this works to get to a 404.php that is in its domain root:
Note: it's the only thing in the .htaccess file and that file is also in the domain root. Redirection (using header location) from the 404.php then works as expected.Code:ErrorDocument 404 /404.php