I have a simple HTML code:
<html>
<head>
<title>Title</title>
</head>
<body>
<p>Test Text<p>
<a href="/gallery/images">Link</a>
</body>
</html>
Of course on local host the Link (/gallery/images) will be:
localhost/gallery/images
My question is; is there a way to change the (localhost) directly when the page is loading and the final html code may be:
<html>
<head>
<title>Title</title>
</head>
<body>
<p>Test Text<p>
<a href="http://newhostname.com/gallery/images">Link</a>
</body>
</html>
= the html of the link becomes:
<a href="http://newhostname.com/gallery/images">Link</a>
Note: if it could done using JavaScript (I think) please tell me how.