我想转换的.htaccess文件的web.config

编程入门 行业动态 更新时间:2024-10-23 02:54:18
本文介绍了我想转换的.htaccess文件的web.config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我要转换的.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

本文发布于:2023-11-12 04:23:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580502.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:我想   文件   config   htaccess   web

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!