2017-10-04 9 views
0

Je gère un site web, computergk.com hébergé sur windows azure et ssl (à partir de windows azure) installé dessus. Je souhaite rediriger la version www du site vers un site autre que www. La configuration web.config existante est ci-dessous:comment rediriger wordpress site web avec ssl à non-www à partir de www fonctionnant sur azure

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
    <system.webServer> 
    <rewrite> 
     <rules> 
     <rule name="WordPress: http://computergk.com" 
patternSyntax="Wildcard"> 
      <match url="*"/> 
       <conditions> 
        <add input="{REQUEST_FILENAME}" matchType="IsFile" 
negate="true"/> 
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" 
negate="true"/> 
       </conditions> 
      <action type="Rewrite" url="index.php"/> 
     </rule></rules> 
    </rewrite> 
    </system.webServer> 
</configuration> 

Je l'ai déjà transmis record www cname de mon domaine à @. J'utilise Windows Azure SSL fourni par Godaddy Class 2 Certification Authority. Aidez-moi, s'il vous plaît.

Merci

Répondre

0

.htaccess Ouvrir et ajouter cette ligne

RewriteEngine On 
#Force non-www: 
RewriteEngine on 
RewriteCond %{HTTP_HOST} ^www\.computergk\.com [NC] 
RewriteRule ^(.*)$ https://computergk.com/$1 [L,R=301] 

# redirect http to https all domain 
RewriteCond %{HTTPS} off 
RewriteRule (.*) https://computergk.com%{REQUEST_URI} [R=301,L] 
+0

Il n'y a pas de fichier .htaccess. Il y a un fichier web.config. –