0

I am creating a simple web proxy (which you can see on here) . Everything is working OK except that resources on the target page, e.x <script src="/js/myScript.js"> redirect to MY WEBSITE/js/myScript.js which does not exist, because it was never meant to be ran on my proxy.

How would I point all links / resources to be fetched through my proxy (I made ascirpt that gets resources). All I need now is to make links / resources go there.

Please help.

Community
  • 1
  • 1
Joseph
  • 1,003
  • 3
  • 11
  • 25

1 Answers1

1

There is always the tag. If you put it in the head and it will tell the browser what the base path for all relative URLs on the page is:

<head>
         <base href="http://awebsite.com/">
</head>

See a more detailed explanation here

Community
  • 1
  • 1
user2503170
  • 145
  • 1
  • 8