2
web.config를 사용하여이 작업을 수행하려고하고 있는데 default.aspx 파일을 가지고 있지만 MVC를 사용하고 있고 아무 것도 없습니다. 루트 .aspx 파일. 홈 컨트롤러와 인덱스보기로 이동하려면 어떻게해야합니까?ASP.NET MVC 비 WWW를 WWW로 리디렉션하고 URL을 소문자로 다시 작성
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect to WWW" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^mydomain.com$" />
</conditions>
<action type="Redirect" url="http://www.mydomain.com/{R:0}"
redirectType="Permanent" />
</rule>
<rule name="convert to lower case" stopProcessing="false">
<match url=".*[A-Z].*" ignoreCase="false"/>
<conditions>
<!-- The following condition prevents rule from rewriting requests to .axd files -->
<add input="{URL}" negate="true" pattern="\.axd$"/>
</conditions>
<action type="Redirect" url="{toLower:{R:0}}" redirectType="Permanent"/>
</rule>
</rules>
</rewrite>
<directoryBrowse enabled="false" />
</system.webServer>
그것은 디렉토리의 내용을 나열 할 수는 없지만 그것이 어쨌든해야하는 것은 아닙니다.
나는 방금 한 것과 거의 비슷한 것을 가지고있다. 나는 그것을 재 출판했고 이제는 효과가있다. –
나는이 글을 대답으로 표시 하겠지만 여기에도 다른 것들이있어서 나에게 유용 할 수있다. 고마워. –