Fórum OpenCart Brasil

Por um e-commerce livre, confiável e profissional

Suporte geral sobre problemas técnicos para OpenCart v1.x.
#44724
olá pessoal tenho esse codigo no meu web.config porém nao estou conseguindo fazer redirecionar o site sem www para o com www
Código: Selecionar todos
<configuration>
<system.webServer>
<rewrite> 
    <rules>
         <rule name="Main Rule" stopProcessing="true">
             <match url="^([^?]*)" />
             <conditions logicalGrouping="MatchAll">
                 <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                 <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
             </conditions>
             <action type="Rewrite" url="index.php?_route_={R:1}" appendQueryString="true" />
         </rule>
     </rules>
 </rewrite>
</system.webServer>
</configuration>
Editado pela última vez por pastilhafreio em 15 Out 2013, 11:28, em um total de 1 vez.
#44739
Galera do stackoverflow sugeriu isto:
Código: Selecionar todos
<rewrite>
  <rules>
    <rule name="Redirect to www" stopProcessing="true">
      <match url="(.*)" />
      <conditions trackAllCaptures="false">
        <add input="{HTTP_HOST}" pattern="^domain.com$" />
      </conditions>
      <action type="Redirect" 
        url="{MapProtocol:{HTTPS}}://www.domain.com/{R:1}" />
    </rule>
  </rules>
  <rewriteMaps>
    <rewriteMap name="MapProtocol">
      <add key="on" value="https" />
      <add key="off" value="http" />
    </rewriteMap>
  </rewriteMaps>
</rewrite>
Substitua domain.com pelo seu domínio.
#44884
não deu da erro
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

Detailed Error Information:
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x8007000d
Config Error Configuration file is not well-formed XML
Config File \\?\E:\home\pastilhade5\pastilhadefreio.com\web\web.config
Requested URL http://pastilhadefreio.com:80/
Physical Path
Logon Method Not yet determined
Logon User Not yet determined

Config Source:
19: </rewriteMaps>
20: </rewrite>