I want to create static web site in nginx. I need a 404.html but it have some js and css link ,path is root, blow
<link href="css/custom.css" rel="stylesheet">
<link href="js/custom.js" rel="stylesheet">
nginx
error_page 404 /404.html;
when i access a not exist file url like http://www.test.com/xxx is ok 404.html correct show.
but when i access url with like http://www.test.com/xxx/xxx, i get a wrong page, open console, i found my css and js path changed http://www.test.com/xxx/custom.css
I see if i change js and css file relative path to absolte path. but i need relative path. I expect get correct 404.html with its js and css file with any url when 404 and js/css use relative.
How to config nginx or other?