我要转换的.htaccess 文件到的web.config 。
下面是code
AddType application/x-httpd-php .html RewriteEngine on RewriteBase / RewriteCond %{Request_Filename} !-d RewriteCond %{Request_Filenam}e !-f RewriteRule ^pages/([0-9A-Za-z_\-~',]+) page_details.html?category_page_title=$1 [NC]
任何人可以帮助我这个.htaccess文件转换为web.config文件。
Can anybody help me to convert this .htaccess file to web.config file.
在此先感谢。
推荐答案对于转换整个的.htaccess 的文件,请参阅本手册:的learn.iis/page.aspx/557/translate-htaccess-content-to-iis-webconfig/
Regarding conversion of whole .htaccess file, see this manual: learn.iis/page.aspx/557/translate-htaccess-content-to-iis-webconfig/
这是pretty的COM prehensive,并解释如何将这些规则。
It is pretty comprehensive and explains how to convert the rules.
如果你只想重写转换规则,请阅读这篇文章: learn.iis/page.aspx/ 470 /进口-Apache的modrewrite-规则/
If you want just rewrite rules converted, read this article: learn.iis/page.aspx/470/importing-apache-modrewrite-rules/
这是一个更一步一步的GUI好心的向导,但在你的情况下,它应该是足够的。
This is a more step-by-step gui kind of guide, but in your case it should probably be enough.
在任何情况下,你列出的规则最终可能会与此(部分)的web.config :
In any case, the rules you listed will probably end up with this (portion of) web.config:
<rewrite> <rules> <rule name="page details" stopProcessing="true"> <match url="^/pages/([0-9A-Za-z_\-~',]+)" ignoreCase="true" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> </conditions> <action type="Redirect" redirectType="Permanent" url="/page_details.html?category_page_title={R:1}" /> </rule> </rules> </rewrite>更多推荐
我想转换的.htaccess文件的web.config
发布评论