简体   繁体   中英

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. 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.

How to do this?

You want to create a handler mapping to make ASP.NET handler response for request which end with .php . 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). You can create the handler mappings with the same Handler except different path " .php ".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM