2017-10-04 9 views
0

私はウェブサイトを実行している、computergk.comはWindows Azureとssl(Windows Azureからインストール)にホストされています。私はウェブサイトのwwwバージョンをwww以外のものにリダイレクトしたいと思います。既存のweb.configの設定は次のとおりです。どのようにsslとのワードプレスのウェブサイトをwwwから非wwwにwwwから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> 

私はすでに自分のドメインのwww cnameレコードを@に転送しています。私はGodaddy Class 2 Certification Authorityが提供するWindows Azure SSLを使用しています。私を助けてください。

おかげ

答えて

0

開き、.htaccessファイルと、このライン

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

一切の.htaccessファイルがありませんを追加します。 web.configファイルがあります。 –

関連する問題