2011-10-06 4 views
1

web.config 파일 만 사용하면 한 도메인에서 다른 도메인으로 리디렉션해야하며 내 웹 사이트의 개별 페이지 (해당 페이지가 25 개)를 해당 리디렉션으로 리디렉션해야합니다 새 도메인 아래의 페이지 홈 페이지 인 /index.htm 페이지 (도메인 이름과 동일)와 /ghostwriter.htm은 해당 홈 페이지가 될 해당 페이지로 리디렉션되어야합니다.리디렉션에 web.config 파일 사용

따라서 : http://www.rainbowriting.com/http://www.rainbowriting.com/ghostwriter.htm (색인 페이지)과 동일한 페이지입니다.

답변

1

ASP.NET이 .htm 파일을 처리하는지 확인해야합니다 (IIS에서 설정). 그런 다음 web.config을 구성하십시오.

<configuration> 
    <location path="oldPage1.htm"> 
    <system.webServer> 
     <httpRedirect enabled="true" destination="http://www.newDomain.com/newPage1.htm" httpResponseStatus="Permanent" /> 
    </system.webServer> 
    </location> 
    <location path="oldPage2.htm"> 
    <system.webServer> 
     <httpRedirect enabled="true" destination="http://www.newDomain.com/newPage2.htm" httpResponseStatus="Permanent" /> 
    </system.webServer> 
    </location> 
    <!-- etc. --> 
</configuration>