Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 我需要帮助将此web.config规则转换为htaccess_Apache_.htaccess_Url Rewriting_Rewrite - Fatal编程技术网

Apache 我需要帮助将此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="^([^/]+)\.([^/]+)\.

我的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}&amp;categoria=portal&amp;module=home&amp;do=index&amp;{QUERY_STRING}"
    />
    </rule>

但是“cliente”的参数总是空的。

您还需要匹配
{QUERY\u STRING}
。请参阅示例。

让我们知道您尝试了哪些可能的副本。对不起,我之前的回答,我不知怎么误读了这个问题。不幸的是,这个问题对我没有帮助(我只对其中一个参数有问题。它是“cliente”,返回时没有值。
RewriteCond %{HTTP_HOST} ^(www\.)subdomain.domain\.com\.br$ [NC]
RewriteRule^ /index.php?cliente={C:1}&amp;categoria=portal&amp;module=home&amp;do=index&amp;{QUERY_STRING}