์ด ๊ฐ์ด๋์์๋ ๋ณด์ ์น ํ๋ก์์ UrlList
๋ฌธ๋ฒ์ ์ค๋ช
ํฉ๋๋ค.
UrlList
๋ฅผ ์ฌ์ฉํ๋ฉด ์ฌ๋ฌ ๊ท์น์์ ์ฌ์ฌ์ฉํ ์ ์๋ ์ฌ๋ฌ ์ผ์น ํญ๋ชฉ์ ๋ง๋ค ์ ์์ต๋๋ค.
UrlList
๋ฌธ๋ฒ์ ์ ์ฒด ๋๋ ์ ๋ฏธ์ฌ๋ก ์ผ์นํ๋ ๋๋ฉ์ธ๊ณผ ๋งค๊ฐ๋ณ์ ๋๋ ์ ๋์ด ๊ฒฝ๋ก๊ฐ ์๋ ์ ์ฒด ๊ฒฝ๋ก๊ฐ ํฌํจ๋ URL์ ์ง์ํฉ๋๋ค.
์ง์๋๋ ์์ผ๋ ์นด๋
UrlList
๋ ๋ถ๋ถ ํ์ ๋๋ฉ์ธ ๋๋ ๋ถ๋ถ ๊ฒฝ๋ก๋ฅผ ์ผ์น์ํค๊ธฐ ์ํ ํ๋ฆฌํฝ์ค๋ก ์ฌ์ฉํ ์ ์๋ *
๋ณํ ์์ผ๋ ์นด๋ ๋ฌธ์๋ฅผ ์ง์ํฉ๋๋ค.
๋ถ๋ถ ๋๋ฉ์ธ์ ์ ๊ณตํ๋ฉด UrlList
๋ ์ ์ฒด ํ์ ๋๋ฉ์ธ ํ ํฐํ๊ณ ๋ง ์ผ์นํฉ๋๋ค. ๊ฒฝ๋ก ๊ตฌ๋ถ์๊ฐ ์ ๊ณต๋์ง ์์ผ๋ฉด UrlList
๋ ๋ชจ๋ ๊ฒฝ๋ก์ ์ผ์นํฉ๋๋ค. ์๋ฅผ ๋ค์ด example.com
์ ์ ๊ณตํ๋ฉด UrlList
๋ ๋๋ฉ์ธ์ ๋ชจ๋ ๊ฒฝ๋ก๋ฅผ ํฌํจํ์ฌ example.com/*
๊ณผ ์ผ์นํฉ๋๋ค.
UrlList
์ ํญ๋ชฉ ํด์ ๋ฐฉ๋ฒ
๋ณด์ ์น ํ๋ก์๋ ์ ๊ณต๋ UrlList
ํจํด์ ์ฌ์ฉํ์ฌ URL๊ณผ ์ผ์น์ํจ ํ URL์ด ํ์ฉ๋๋์ง ์ฌ๋ถ๋ฅผ ๊ฒฐ์ ํฉ๋๋ค.
UrlList
๋ ๋ค์์ ๋ฐ๋ผ ํญ๋ชฉ์ ํด์ํฉ๋๋ค.
๋ง์นจํ(
.
)์ ์ฌ๋์(/
)๊ฐ ํฌํจ๋ ํญ๋ชฉ์ ์ฌ๋ฐ๋ฅธ ํ์์ URL์ด์ด์ผ ํฉ๋๋ค. ํ์ ๋๋ฉ์ธ ๋ฐ ๊ฒฝ๋ก ์์ผ๋ ์นด๋๋ฅผ ํฌํจํ ์ ์์ต๋๋ค. ์ฒซ ๋ฒ์งธ/
๋ฌธ์ ์ผ์ชฝ์ ์๋ ํ ํฐ์google.com/news
์.com
์ ๊ฐ์ ์ต์์ ๋๋ฉ์ธ์ผ๋ก ํด์๋ฉ๋๋ค.๋ง์นจํ(
.
)๋ฅผ ํฌํจํ๊ณ ์ฌ๋์(/
)๊ฐ ์๋ ํญ๋ชฉ์ ๋๋ฉ์ธ์ผ๋ก ํด์๋ฉ๋๋ค. ํ์ ๋๋ฉ์ธ ์์ผ๋ ์นด๋๋ฅผ ํฌํจํ ์ ์์ต๋๋ค. ์ด ๊ฒฝ์ฐ ๊ฐ์ฅ ์ค๋ฅธ์ชฝ์ ์๋ ํ ํฐ์abc.xyz
์.xyz
์ ๊ฐ์ ์ต์์ ๋๋ฉ์ธ์ผ๋ก ํด์๋ฉ๋๋ค.๊ทธ ์ธ ๋ชจ๋ ํญ๋ชฉ์ ์ ํจํ์ง ์์ต๋๋ค.
UrlList
ํจํด์ด request.url()
์ ๊ฐ์ด ์ฌ๋์(/
)๊ฐ ํฌํจ๋ ๊ฐ๊ณผ ์ผ์นํ๋ฉด ํจํด์ด ์์์ ์ค๋ช
ํ ๋๋ก ํด์๋ฉ๋๋ค. ๊ทธ๋ฌ๋ UrlList
ํจํด์ด /
๊ฐ ์๋ ๊ฐ๊ณผ ์ผ์นํ๋ฉด(์: host()
) ํจํด์ ๋๋ฉ์ธ ๋ถ๋ถ๋ง ์ผ์นํฉ๋๋ค.
ํจํด ์ผ์น ์์
๋ค์ ํ์๋ ํจํด ์์ ,๊ฐ ํจํด์ด ์ผ์นํ๋ URL ์์, ๊ฐ ํจํด์ด ์ผ์นํ์ง ์๋ URL ์์๊ฐ ๋์ ์์ต๋๋ค.
ํจํด | ์ผ์น | ์ผ์นํ์ง ์์ |
---|---|---|
*example.com |
example.com/ server.example.com/ sample.server.example.com/ example.com/path example.com/path?q=query example.com/path/subpath sample.server.example.com/path/ |
myexample.com/ example.com.bad.com/ us13.altostrat.com/go/example.com/path www.google.com/search?q=example.com |
*.example.com |
server.example.com/ sample.server.example.com/ sample.server.example.com/path/ |
myexample.com/ example.com.bad.com/ us13.altostrat.com/go/example.com/path www.google.com/search?q=example.com example.com/ example.com/path example.com/path/subpath |
example.com |
example.com/ example.com/path example.com/path/subpath |
myexample.com/ example.com.bad.com/ us13.altostrat.com/go/example.com/path www.google.com/search?q=example.com server.example.com/ sample.server.example.com/ sample.server.example.com/path/ |
*server.example.com |
server.example.com/ sample.server.example.com/path sample.server.example.com/path/ |
myexample.com/ example.com.bad.com/ us13.altostrat.com/go/example.com/path www.google.com/search?q=example.com example.com/ example.com/path example.com/path/subpath |
*example.com/ |
example.com/ server.example.com/ sample.server.example.com/ |
myexample.com/ example.com.bad.com/ us13.altostrat.com/go/example.com/path www.google.com/search?q=example.com example.com/path/ example.com/path/subpath sample.server.example.com/path/ |
*example.com/path* |
example.com/path example.com/path/subpath sample.server.example.com/path/ |
myexample.com/ example.com.bad.com/ us13.altostrat.com/go/example.com/path www.google.com/search?q=example.com example.com/ server.example.com/ sample.server.com/ |
*example.com/path/* |
example.com/path/subpath sample.server.example.com/path/ |
myexample.com/ example.com.bad.com/ us13.altostrat.com/go/example.com/path www.google.com/search?q=example.com example.com/ server.example.com/ sample.server.example.com/ example.com/path |
*example.com/path/ |
sample.server.example.com/path/ | myexample.com/ example.com.bad.com/ us13.altostrat.com/go/example.com/path www.google.com/search?q=example.com example.com/ sample.example.com/ sample.server.example.com/ example.com/path example.com/path/subpath |
example.com/ |
example.com/ | myexample.com/ example.com.bad.com/ us13.altostrat.com/go/example.com/path www.google.com/search?q=example.com server.example.com/ sample.server.example.com/ example.com/path example.com/path/subpath sample.server.example.com/path/ |