웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
IIS 7용 Rewrite
2011.02.20 18:08
아래 Rule을 web.config에 넣으면 됩니다.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="rule 1" stopProcessing="true">
<match url="^layouts/(.+)/(.+)\.html$" ignoreCase="false" />
<action type="Rewrite" url="./index.php" />
</rule>
<rule name="rule 2" stopProcessing="true">
<match url="^(.+)/files/(member_extra_info|attach|cache|faceOff)/(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{SCRIPT_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="./files/{R:2}/{R:3}" />
</rule> <rule name="rule 3" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)(/[a-zA-Z0-9_]+(/entry)?)?/(files|modules|common|widgets|widgetStyle|layouts|addons)/(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{SCRIPT_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="./{R:4}/{R:5}" />
</rule>
<rule name="rule 4" stopProcessing="true">
<match url="^(rss|atom)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?module=rss&act={R:1}" appendQueryString="false" />
</rule>
<rule name="rule 5" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/(rss|atom|api)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?mid={R:1}&act={R:2}" appendQueryString="false" />
</rule>
<rule name="rule 6" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?vid={R:1}&mid={R:2}&act={R:3}" appendQueryString="false" />
</rule>
<rule name="rule 7" stopProcessing="true">
<match url="^([0-9]+)/(.+)/trackback$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?document_srl={R:1}&key={R:2}&act=trackback" appendQueryString="false" />
</rule>
<rule name="rule 8" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?vid={R:1}&document_srl={R:2}&key={R:3}&act=trackback" appendQueryString="false" />
</rule>
<rule name="rule 9" stopProcessing="true">
<match url="^admin/?$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?module=admin" appendQueryString="false" />
</rule>
<rule name="rule 10" stopProcessing="true">
<match url="^([0-9]+)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?document_srl={R:1}" appendQueryString="false" />
</rule>
<rule name="rule 11" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/?$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{SCRIPT_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="./index.php?mid={R:1}" appendQueryString="false" />
</rule>
<rule name="rule 12" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/([0-9]+)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?mid={R:1}&document_srl={R:2}" appendQueryString="false" />
</rule>
<rule name="rule 13" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/?$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{SCRIPT_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="./index.php?vid={R:1}&mid={R:2}" appendQueryString="false" />
</rule>
<rule name="rule 14" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?vid={R:1}&mid={R:2}&document_srl={R:3}" appendQueryString="false" />
</rule>
<rule name="rule 15" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/entry/(.+)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?mid={R:1}&entry={R:2}" appendQueryString="false" />
</rule>
<rule name="rule 16" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/(.+)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?vid={R:1}&mid={R:2}&entry={R:3}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="rule 1" stopProcessing="true">
<match url="^layouts/(.+)/(.+)\.html$" ignoreCase="false" />
<action type="Rewrite" url="./index.php" />
</rule>
<rule name="rule 2" stopProcessing="true">
<match url="^(.+)/files/(member_extra_info|attach|cache|faceOff)/(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{SCRIPT_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="./files/{R:2}/{R:3}" />
</rule> <rule name="rule 3" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)(/[a-zA-Z0-9_]+(/entry)?)?/(files|modules|common|widgets|widgetStyle|layouts|addons)/(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{SCRIPT_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="./{R:4}/{R:5}" />
</rule>
<rule name="rule 4" stopProcessing="true">
<match url="^(rss|atom)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?module=rss&act={R:1}" appendQueryString="false" />
</rule>
<rule name="rule 5" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/(rss|atom|api)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?mid={R:1}&act={R:2}" appendQueryString="false" />
</rule>
<rule name="rule 6" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?vid={R:1}&mid={R:2}&act={R:3}" appendQueryString="false" />
</rule>
<rule name="rule 7" stopProcessing="true">
<match url="^([0-9]+)/(.+)/trackback$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?document_srl={R:1}&key={R:2}&act=trackback" appendQueryString="false" />
</rule>
<rule name="rule 8" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?vid={R:1}&document_srl={R:2}&key={R:3}&act=trackback" appendQueryString="false" />
</rule>
<rule name="rule 9" stopProcessing="true">
<match url="^admin/?$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?module=admin" appendQueryString="false" />
</rule>
<rule name="rule 10" stopProcessing="true">
<match url="^([0-9]+)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?document_srl={R:1}" appendQueryString="false" />
</rule>
<rule name="rule 11" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/?$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{SCRIPT_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="./index.php?mid={R:1}" appendQueryString="false" />
</rule>
<rule name="rule 12" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/([0-9]+)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?mid={R:1}&document_srl={R:2}" appendQueryString="false" />
</rule>
<rule name="rule 13" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/?$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{SCRIPT_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="./index.php?vid={R:1}&mid={R:2}" appendQueryString="false" />
</rule>
<rule name="rule 14" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?vid={R:1}&mid={R:2}&document_srl={R:3}" appendQueryString="false" />
</rule>
<rule name="rule 15" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/entry/(.+)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?mid={R:1}&entry={R:2}" appendQueryString="false" />
</rule>
<rule name="rule 16" stopProcessing="true">
<match url="^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/(.+)$" ignoreCase="false" />
<action type="Rewrite" url="./index.php?vid={R:1}&mid={R:2}&entry={R:3}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
댓글 0
제목 | 글쓴이 | 날짜 |
---|---|---|
외부페이지 로그인 연동 [10] | 응삼 | 2011.02.28 |
XE 모듈/스킨 개발시 사용 가능한 변수 알아내기 [3] | 도라란 | 2011.02.27 |
메뉴 클릭시 알림메시지 띄우기 [1] | 도라란 | 2011.02.27 |
xe_member 테이블에서 extra_vars 필드 분리하기... [1] | 맘편한넘 | 2011.02.26 |
XE 검색 속도 향상 팁(확장 변수 검색시) [5] | 명드래곤 | 2011.02.26 |
확장변수 - 주소입력 받을 시 안내문구 출력 [2] | 반디소리 | 2011.02.24 |
글쓴이의 정보 추출해서 게시판 출력하기 [9] | 야호z | 2011.02.24 |
모듈 개발하실때 새로운 버전이 나오면 알림 기능 만들기 [4] | 라르게덴 | 2011.02.24 |
디자인 하시는 분에게 ~ 신기한 팁 (from IE) [2] | 999 | 2011.02.23 |
[중복일수도...] Srl 생성의 비밀???;;? [1] | RainDrop+ | 2011.02.22 |
문자열 처리 함수 + 파일 처리 함수 [1] | 999 | 2011.02.22 |
7일이상 지난 글에 댓글달면 포인트 지급 안하기 [19] | SMaker | 2011.02.21 |
IIS 7용 Rewrite | fsfsdas | 2011.02.20 |
nginx에서 대역폭 제한하기 | fsfsdas | 2011.02.20 |
apache2에서 proxy 설정하기 | fsfsdas | 2011.02.20 |
nginx에서 proxy 설정하기 [2] | fsfsdas | 2011.02.20 |
php5 설정(최적화) | fsfsdas | 2011.02.20 |
MySQL db를 InnoDB로 바꾸기 (MyISAM to InnoDB) | fsfsdas | 2011.02.20 |
리눅스에서 디렉토리, 파일 용량 확인하기 | fsfsdas | 2011.02.20 |
우분투 charset을 euc-kr로 변경하기 | fsfsdas | 2011.02.20 |