UrlList ๋ฌธ๋ฒ• ์ฐธ์กฐ

์ด ๊ฐ€์ด๋“œ์—์„œ๋Š” ๋ณด์•ˆ ์›น ํ”„๋ก์‹œ์˜ 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/