[英]I need help to convert this web.config rule to htaccess
I have this rule on my web.config document, and i need to convert in an htaccess rule. 我的web.config文档中有此规则,我需要转换为htaccess规则。
<rule name="Redirect subdomain" enabled="true" patternSyntax="ECMAScript">
<match url="^(.*)$" />
<conditions>
<add input="{HTTP_HOST}" pattern="^([^/]+)\.([^/]+)\.com\.br$" />
</conditions>
<action type="Rewrite" url="/index.php?cliente={C:1}&categoria=portal&module=home&do=index&{QUERY_STRING}"
/>
</rule>
I have tried this: 我已经试过了:
RewriteCond %{HTTP_HOST} ^(www\.)subdomain.domain\.com\.br$ [NC]
RewriteRule^ /index.php?cliente={C:1}&categoria=portal&module=home&do=index&{QUERY_STRING}
But the parameter of "cliente" is aways empty. 但是“ cliente”的参数为空。
You need to match {QUERY_STRING}
as well. 您还需要匹配
{QUERY_STRING}
。 See htaccess RewriteRule page with query string for example. 例如,请参阅带有查询字符串的htaccess RewriteRule页面 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.