Apache 我需要帮助将此web.config规则转换为htaccess
我的web.config文档中有此规则,需要在htaccess规则中转换Apache 我需要帮助将此web.config规则转换为htaccess,apache,.htaccess,url-rewriting,rewrite,Apache,.htaccess,Url Rewriting,Rewrite,我的web.config文档中有此规则,需要在htaccess规则中转换 <rule name="Redirect subdomain" enabled="true" patternSyntax="ECMAScript"> <match url="^(.*)$" /> <conditions> <add input="{HTTP_HOST}" pattern="^([^/]+)\.([^/]+)\.
<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>
但是“cliente”的参数总是空的。您还需要匹配
{QUERY\u STRING}
。请参阅示例。让我们知道您尝试了哪些可能的副本。对不起,我之前的回答,我不知怎么误读了这个问题。不幸的是,这个问题对我没有帮助(我只对其中一个参数有问题。它是“cliente”,返回时没有值。
RewriteCond %{HTTP_HOST} ^(www\.)subdomain.domain\.com\.br$ [NC]
RewriteRule^ /index.php?cliente={C:1}&categoria=portal&module=home&do=index&{QUERY_STRING}