In my Flask app. If the page's path is http://example.com/product/6
. I can't import js file in this page's html file like this :
<script src="js/main.js"></script>
The browser will search the js file in http://example.com.product/js/main.js
, and return 404 error.
So, what should I do to fix this ?