So I've created a .htaccess file with only this line of code: ErrorDocument 404 /lost.html And uploaded it to the root of my website. Now this works fine when typing a non-exsistant address in the root of my website: www.aptitude-test.com/funky.html - which is non-exsistant - redirects to www.aptitude-test.com/lost.html However, when I type a non-exsistant address within a subfolder it redirects incorrect: www.aptitude-test.com/funky/funky.html- which is non-exsistant - redirects to www.aptitude-test.com/funky/lost.html - which is non exsistant Is there anyway to force the redirection to www.aptitude-test.com/lost.html for all 404's?
Well, you have to use absolute paths for your 404 site. I stumbled upon this problem myself, but using absolute paths fixed it.
That is what I was just about to suggest. What is happening is that the browser is going back just one level with the / If you use the full URL you will get what you want. wiz
I see, it works now. I removed the / and simply typed in the full URL. It was that simple. Thank you!