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
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
Last edited by Deadweight; 09-25-2014 at 10:14 PM.
-DW [Deadweight]
Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved
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
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Yeah i did try all that
"/404.php"
/404.php
and "404.php"
Nothing works still (Im running it from localhost.)
-DW [Deadweight]
Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved
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
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Bookmarks