dongshengyin0147 2019-04-18 11:42
浏览 99

如何使用web.config将所有.asp页面重定向到IIS上的.php页面

as a php programmer, I usually redirect pages with .htaccess, but having inherited a project formerly made with asp, I need to redirect pages to same-named pages in php. For pages that do not exist in php, index.php should be the redirected page.

Would you please help me with some suggestions and resources? I can only find single page to single page redirect.

Thank you very much

  • 写回答

1条回答 默认 最新

  • dongwei3172 2019-04-30 14:45
    关注

    First you have to configure the .Net handlers to process your Classic ASP requests You do that with runAllManagedModulesForAllRequests="true" read more here and here

    Next, you can use the built in URL rewrite module to do a wild card replace or a one-to-one map via web.config

    As a backup, you can use the Global.asax's Application_BeginRequest event to parse out the requested URL and do a permanent redirect to PHP

    Hope this helps

    评论

报告相同问题?

悬赏问题

  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程