I have a website www.website.com that when entered like that it opens a deafult page.
I have the code
string Linkname;
if (Request.PathInfo.Length != 0)
Linkname= Request.PathInfo.Substring(1);
else
Linkname="xyz";
and then I load the page. the issue is when I type
www.websitet.com/xyz I get a 404 error. but if I type www/websitet.com/DocumentList.aspx/xyz it works fine.
How do you set up iis 7 in order so that instead of trying to go to the directory xyz it will go to my default page (documentlist.aspx) and look at the Pathinfo.
Luckbox72
Member
25 Points
63 Posts
Not sure how to do in IIS7
Feb 17, 2010 06:34 PM|LINK
I have a website www.website.com that when entered like that it opens a deafult page.
I have the code
string Linkname;
if (Request.PathInfo.Length != 0)
Linkname= Request.PathInfo.Substring(1);
else
Linkname="xyz";
and then I load the page. the issue is when I type www.websitet.com/xyz I get a 404 error. but if I type www/websitet.com/DocumentList.aspx/xyz it works fine.
How do you set up iis 7 in order so that instead of trying to go to the directory xyz it will go to my default page (documentlist.aspx) and look at the Pathinfo.
Thanks