开发者

How to configure url rewriting in IIS6 to consider url ending with "/" like a page?

I'm working on Windows Server2003 with the following:

IIS6

.NET Runtime 2.0

ASP.NET C#

I've got some pages like these:

fr.mywebsite.eu/productA/sub_product1.html  
fr.mywebsite.eu/productA/sub_product2.html  

fr.mywebsite.eu/productB/sub_product14.html  
fr.mywebsite.eu/productC/sub_product26.html  

The directories productA, productB, productC don't really exist.

In my global asax, I get the url requested and I do something like this:

HttpContext.Current.RewritePath(
    "product.aspx?p=" + codeProduct + "&sp=" + codeSubProduct);

For now everything is working.开发者_开发技巧

But I'm trying to make the following page list all subproducts:

http://fr.mywebsite.eu/productB/

The problem is that IIS considers productB to be a directory and I get a 404 error.

Is there any directive to make IIS not check if DIRECTORY exist similar to the manner of ISAPI extensions but for a directory?


I just find the issue. I had to insert a wildcard application maps to \v2.0.50727\aspnet_isapi.dll don't check if the file exist.


If you have admin access to the server, use http://iirf.codeplex.com/ which will do this and much more (for free) without even involving ASP...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜