You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an html file that is loaded from a wildcard route.
The html file loaded is based on the url of the request object.
The actual path in the server is different to the url in the request object.
Inside the html file, there is a javascript file with a relative path e.g., "<script type="module" crossorigin src="./scripts/load.js"></script>"
The file is located at the location.
Javascript file is loaded using the url of the request object as a relative path to html.
When I load the html file via a predefined route, the page loads ok with 200 status but the javascript file fails with 404.
The url of the request object for the javascript file is as follows "{html route url}/scritps.load.js".
How do I change the javascript url to be "{actual html path relative to root}/scripts/load.js".
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I have an html file that is loaded from a wildcard route.
The html file loaded is based on the url of the request object.
The actual path in the server is different to the url in the request object.
Inside the html file, there is a javascript file with a relative path e.g., "<script type="module" crossorigin src="./scripts/load.js"></script>"
The file is located at the location.
Javascript file is loaded using the url of the request object as a relative path to html.
When I load the html file via a predefined route, the page loads ok with 200 status but the javascript file fails with 404.
The url of the request object for the javascript file is as follows "{html route url}/scritps.load.js".
How do I change the javascript url to be "{actual html path relative to root}/scripts/load.js".
Thank you
Beta Was this translation helpful? Give feedback.
All reactions