[英]I need help to convert this web.config rule to htaccess
我的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>
我已經試過了:
RewriteCond %{HTTP_HOST} ^(www\.)subdomain.domain\.com\.br$ [NC]
RewriteRule^ /index.php?cliente={C:1}&categoria=portal&module=home&do=index&{QUERY_STRING}
但是“ cliente”的參數為空。
您還需要匹配{QUERY_STRING}
。 例如,請參閱帶有查詢字符串的htaccess RewriteRule頁面 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.