error_page 404 /404.html;
location = /404.html {
root /var/www/;
}
I use the above to catch and direct 404s to a custom 404.html page in /var/www. All my other pages are located in another place. This works fine for catching invalid file request (www.me.net/path1/invalid_file.txt), but doesn't work properly for invalid folder request (www.me.net/invalid_path/). The problem is that I have an image in the custom 404 page and it doesn't show up when erroring on an invalid folder. I guess what I am asking is how do you process bad folder request?
Thanks.
location = /404.html {
root /var/www/;
}
I use the above to catch and direct 404s to a custom 404.html page in /var/www. All my other pages are located in another place. This works fine for catching invalid file request (www.me.net/path1/invalid_file.txt), but doesn't work properly for invalid folder request (www.me.net/invalid_path/). The problem is that I have an image in the custom 404 page and it doesn't show up when erroring on an invalid folder. I guess what I am asking is how do you process bad folder request?
Thanks.