2017-10-04 7 views
0

나는 웹 사이트를 운영하고 있는데, computergk.com은 windows azure 및 ssl (windows azure)에서 호스팅됩니다. 웹 사이트의 www 버전을 www가 아닌 ​​URL로 리디렉션하고 싶습니다. 기존 web.config 구성은 다음과 같습니다.웹 사이트에서 ssl로 www가 아닌 ​​www로 리디렉션하는 방법

<?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 파일이 있습니다. –