[英]url rewriting for .php extension to .aspx in IIS
I have a PHP website in IIS 8.5 running on Windows Server 2012. I need to change one of its URLs (ending with .php extension) to .aspx. 我在Windows Server 2012上运行的IIS 8.5中有一个PHP网站。我需要将其中一个URL(以.php扩展名结尾)更改为.aspx。 For more clarification, say my site is www.abc.com and I need to rewrite a page www.abc.com/test.php into www.abc.com/test.aspx.
有关更多说明,请说我的网站是www.abc.com,我需要将页面www.abc.com/test.php重写为www.abc.com/test.aspx。
How to do this? 这个怎么做?
You want to create a handler mapping to make ASP.NET handler response for request which end with .php
. 您希望创建一个处理程序映射,以便对以
.php
结尾的请求进行ASP.NET处理程序响应。 When you click handler mappings on IIS, you can find some handler mappings named "PageHandlerFactory-xxx" and their paths are " .aspx
"(ASP.NET role service is required here). 单击IIS上的处理程序映射时,可以找到一些名为“PageHandlerFactory-xxx”的处理程序映射,其路径为“
.aspx
”(此处需要ASP.NET角色服务)。 You can create the handler mappings with the same Handler except different path " .php
". 除了不同的路径“
.php
”之外,您可以使用相同的Handler创建处理程序映射。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.