Logo da MMHospedagem
Carregando...
Como resolver o problema de pesquisa/busca de domínios no WHMCS
Друк
  • 0

O WHMCS não é totalmente compatível no ambiente de hospedagem de sites em Windows/Plesk, por isso preparamos esse tutorial para ensinar a adicionar um código ao arquivo web.config de sua hospedagem para que funcione corretamente.


 


1. Acessando o Gerenciador de Arquivos do painel de controle Plesk/Windows onde o seu WHMCS está hospedado, edite o arquivo web.config existente adicionando o seguinte código entre as tags <rewrite> e </rewrite>:

<outboundRules>
<rule name="whmcsjson" preCondition="PHPRequest">
<match serverVariable="RESPONSE_CONTENT_TYPE" pattern="^text/html; charset=utf-8,(.+)"/>
<action type="Rewrite" value="{R:1}"/>
</rule>
<preConditions>
<preCondition name="PHPRequest">
<add input="{REQUEST_URI}" pattern=".*\.php"/>
</preCondition>
</preConditions>
</outboundRules>


2. Caso queira, este é o conteúdo completo que deve ser adicionado ao arquivo web.config com a regra de URLS AMIGÁVEIS do WHMCS inclusa:

<?xml version="1.0" encoding="UTF-8"?>

<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="rule 1j" stopProcessing="true">
<match url="^announcements/([0-9]+)/[a-z0-9_-]+\.html$" ignoreCase="true" />
<action type="Rewrite" url="/./announcements.php?id={R:1}" />
</rule>
<rule name="rule 2j" stopProcessing="true">
<match url="^announcements$" ignoreCase="true" />
<action type="Rewrite" url="/./announcements.php" />
</rule>
<rule name="rule 3j" stopProcessing="true">
<match url="^downloads/([0-9]+)/([^/]*)$" ignoreCase="true" />
<action type="Rewrite" url="/./downloads.php?action=displaycat&amp;catid={R:1}" />
</rule>
<rule name="rule 4j" stopProcessing="true">
<match url="^downloads$" ignoreCase="true" />
<action type="Rewrite" url="/./downloads.php" />
</rule>
<rule name="rule 5j" stopProcessing="true">
<match url="^knowledgebase/([0-9]+)/[a-z0-9_-]+\.html$" ignoreCase="true" />
<action type="Rewrite" url="/./knowledgebase.php?action=displayarticle&amp;id={R:1}" />
</rule>
<rule name="rule 6j" stopProcessing="true">
<match url="^knowledgebase/([0-9]+)/([^/]*)$" ignoreCase="true" />
<action type="Rewrite" url="/./knowledgebase.php?action=displaycat&amp;catid={R:1}" />
</rule>
<rule name="rule 7j" stopProcessing="true">
<match url="^knowledgebase$" ignoreCase="true" />
<action type="Rewrite" url="/./knowledgebase.php" />
</rule>
</rules>
<outboundRules>
<rule name="whmcsjson" preCondition="PHPRequest">
<match serverVariable="RESPONSE_CONTENT_TYPE" pattern="^text/html; charset=utf-8,(.+)"/>
<action type="Rewrite" value="{R:1}"/>
</rule>
<preConditions>
<preCondition name="PHPRequest">
<add input="{REQUEST_URI}" pattern=".*\.php"/>
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
</system.webServer>
</configuration>


Ця відповідь Вам допомогла?

Схожі статті

MMHospedagem