2014-11-15 4 views
1

이 .htaccess를 web.config 파일로 변환하여 올바르게 작동하는 방법과 해당 파일의 올바른 이름 인 web.config입니까?.htacces를 web.config로 302 리디렉션

RewriteEngine On 
RewriteBase/

RewriteRule ^(.*)$ http://www.mynedomain.com/$1 [R=302,L] 

답변

1

예,이 작업은 수행해야 할 파일이 web.config입니다.

당신은 당신의 htaccess로 코드에서 규칙

<rewrite> 
    <rules> 
    <rule name="Redirect to new domain" stopProcessing="true"> 
     <match url="^(.*)$" /> 
     <action type="Redirect" url="http://www.mynedomain.com/{R:1}" redirectType="Found" /> 
    </rule> 
    </rules> 
</rewrite> 

위해에 rewrite 블록을 추가 할 수 있습니다, 당신은 (내가 규칙에 Found을 사용 그 이유는)이 302 리디렉션이있다.
301 리디렉션 대신 FoundPermanent으로 바꿔야합니다.

관련 문제