system.webServer/重写 ->网址重写
我有一个带有此 Web.config
的 php 项目:
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
但需要将其安装在 IIS6 上。想知道是否可以在 UrlRewriting.NET 上进行配置?又如何呢?
I have a php project with this Web.config
:
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
But need to install it on IIS6. Wondering if its possible to configure on UrlRewriting.NET? And how?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
UrlRewriting.NET 的限制之一是只能重写 ASP.NET 管道处理的页面和资源,而 PHP 当然不能。
您需要第三方工具,例如 Iconics IRF 或 HeliconTech 的 ISAPI_Rewrite3 能够满足您的重写要求。
One of the limitations of UrlRewriting.NET is that only pages and resources handled by the ASP.NET pipeline can be rewritten, which of course PHP can't be.
You would need a third party tool such as Iconics IRF or HeliconTech's ISAPI_Rewrite3 to be able to satisfy your rewrite requirements.