3초기억력

URL Rewrite 본문

플밍_ASP

URL Rewrite

잠수콩 2015. 3. 18. 17:04



제목 :  URL Rewrite


소스 :




내용 :

IIS URL Rewrite 2.0 enables Web administrators to create powerful rules to implement URLs that are easier for users to remember and easier for search engines to find. By using rule templates, rewrite maps, .NET providers, and other functionality integrated into IIS Manager, Web administrators can easily set up rules to define URL rewriting behavior based on HTTP headers, HTTP response or request headers, IIS server variables, and even complex programmatic rules. In addition, Web administrators can perform redirects, send custom responses, or stop HTTP requests based on the logic expressed in the rewrite rules.



예제 소스 파일 :

rewrite_x64_ko-KR.msi

 

 

http://localhost:8077/board/708 방식으로 사용하고 싶을때

 

web.config 파일에

 

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Rewrite to board_view.asp">
                    <match url="^board/([0-9]+)" />
                    <action type="Rewrite" url="/board_view.asp?idx={R:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

 

이렇게 넣으면 됨

 



Comments