|Posted: 14 December 2008 at 3:51am
I am not sure that this is the right product for my requirement but still, here it is:
I have a website that contains various pages. Those pages contain links. Some of the links are relative and some of them are absolute. By static links I mean links that start with a /.
For example suppose I have two pages on my site. One is http://mysite.com/folder1/page1.html and the other is http:mysite.com/folder2.page2.html
now, page1 has a link to page2. This can be done in two ways:
The relative way: ../folder2/page2.html or the absolute way /folder2/page2.html
Of course the preference is to make all links relative since then I can installl my site in a virtual folder and it will still work.
What I am looking for is an ISAPI filter that can scan through all HTML code returned from my website and whenever it encounters an absolute url to my site, convert it to a relative URL.
At first I thought that ISAPI Rewrite will do the job but then I understood that it can only rewrite the URL in the request and not the URLs in the response. Am I right about that asumption? Is there some other product that can help me with what I need? Is it LinkFreeze?