Last post May 15, 2006 05:21 PM by jcw14
Member
19 Points
1676 Posts
May 10, 2006 04:38 PM|rfurdzik|LINK
This is the link created on the catalog page:
http://localhost/csk11/cid/10/catalog.aspx?cid=10&m=13
it should be:
http://localhost/csk11/catalog.aspx?cid=10&m=13
Is there a way to force .NET to use the rewritten path, which is http://localhost/csk11/ instead of using the original path http://localhost/csk11/cid/10/ for the relative links on the page?
Original link:
http://localhost/csk11/cid/10/default.aspx
Rewritten link:
30 Points
805 Posts
May 10, 2006 10:58 PM|zhuhua1006|LINK
I think you have not read this excellent article http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/urlrewriting.asp. It can be great helpful to your problem.
You can download the source code form here http://download.microsoft.com/download/0/4/6/0463611e-a3f9-490d-a08c-877a83b797cf/MSDNURLRewriting.msi. This sample code is similar to your problem and you can take a reference.
May 10, 2006 11:33 PM|rfurdzik|LINK
350 Points
577 Posts
May 15, 2006 05:21 PM|jcw14|LINK
Not without some hefty work.:-)
You could subclass a Hyperlink control, and then override the Render to emit your custom HTML link.
Member
19 Points
1676 Posts
URL Rewriter - relative links do not work after rewriting
May 10, 2006 04:38 PM|rfurdzik|LINK
This is the link created on the catalog page:
http://localhost/csk11/cid/10/catalog.aspx?cid=10&m=13
it should be:
http://localhost/csk11/catalog.aspx?cid=10&m=13
Is there a way to force .NET to use the rewritten path, which is http://localhost/csk11/ instead of using the original path http://localhost/csk11/cid/10/ for the relative links on the page?
Original link:
http://localhost/csk11/cid/10/default.aspx
Rewritten link:
http://localhost/csk11/catalog.aspx?cid=10&m=13
</div>Member
30 Points
805 Posts
Re: URL Rewriter - relative links do not work after rewriting
May 10, 2006 10:58 PM|zhuhua1006|LINK
I think you have not read this excellent article http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/urlrewriting.asp. It can be great helpful to your problem.
You can download the source code form here http://download.microsoft.com/download/0/4/6/0463611e-a3f9-490d-a08c-877a83b797cf/MSDNURLRewriting.msi. This sample code is similar to your problem and you can take a reference.
Member
19 Points
1676 Posts
Re: URL Rewriter - relative links do not work after rewriting
May 10, 2006 11:33 PM|rfurdzik|LINK
Member
350 Points
577 Posts
Re: URL Rewriter - relative links do not work after rewriting
May 15, 2006 05:21 PM|jcw14|LINK
Not without some hefty work.:-)
You could subclass a Hyperlink control, and then override the Render to emit your custom HTML link.
My Blog: http://www.wintersfamily.plus.com/blogs/JamesWinters