![](/img/trans.png)
[英]Apache .htaccess rewrite rule to IIS FastCGI web.config rule problems
[英]Converting a web.config rewrite rule to Apache format
我想转换这个web.config
<rule name="cambiarPass" stopProcessing="true">
<match url="^cambiarPass/" />
<action type="Rewrite" url="modulos/cambiarPass/controller.php" appendQueryString="false" />
</rule>
.htaccess。 请帮忙!
请记住,我不使用IIS,但是就如何将其转换为Apache重写规则而言,所提供的代码似乎很不言自明。
<match url="^cambiarPass/" />
行设置为仅将URL重写应用于以cambiarPass/
开头的URL(路径)。 的
<action type="Rewrite" url="modulos/cambiarPass/controller.php" appendQueryString="false" />
一行是重写所有匹配的URL并将其重定向到modulos/cambiarPass/controller.php
。 appendQueryString
属性显然是Apache QSA重写标志的同义词,这意味着重写过程将丢弃并忽略重写过程中任何现有的查询字符串数据。 stopProcessing
属性似乎与Apache L重写标志等效,这意味着如果该规则匹配,则可能会遵循当前规则的任何其他重写规则都将被忽略。
这是完整的代码。
RewriteEngine on
RewriteRule ^cambiarPass/ modulos/cambiarPass/controller.php [L]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.