Using ISAPI rewrites my site uses friendly URLs. My problem is that on some pages I have search forms, I want to do a response redirect when the form button is clicked. However when I’m on a rewritten URL page I get a 404 error as it cant find the page, but
if I remove the rewritten URL and enter the full URL the it works fine.
Alcoalex
Member
111 Points
121 Posts
404 error when posting from rewritten url page
Nov 11, 2010 05:37 PM|LINK
I’m developing my site in .Net 2.0
Using ISAPI rewrites my site uses friendly URLs. My problem is that on some pages I have search forms, I want to do a response redirect when the form button is clicked. However when I’m on a rewritten URL page I get a 404 error as it cant find the page, but if I remove the rewritten URL and enter the full URL the it works fine.
Is there a solution to this?
Thanks.
Deeshal
Contributor
2081 Points
418 Posts
Re: 404 error when posting from rewritten url page
Nov 12, 2010 12:10 AM|LINK
Are you using context.rewrite to redirect to the actual page?
vijayst
All-Star
16558 Points
3216 Posts
Microsoft
Re: 404 error when posting from rewritten url page
Nov 12, 2010 12:53 AM|LINK
In Response.Redirect, use the path from ~/Folder/File.aspx instead of relative path.
http://liteblog.codeplex.com