4,489,172 th visitor since 2017.2.1 ( Today : 688 )
Computer ???
No. 494
Name. swindler
Subject. HaPxory 1.8 non-www www로 리다이렉트하기
Main Cate. Internet일반
Sub Cate.
Date. 2018-02-27 16:17
Hit. 3518 (125.131.199.20)
File.
1.8문서에 아래와 같이 씌여져 있다.

http://cbonte.github.io/haproxy-dconv/1.8/configuration.html#redirect location

http-request redirect code 301 location \
http://www.%[hdr(host)]%[capture.req.uri] \
unless { hdr_beg(host) -i www }


참고로 줄 바꿈 표기를 위해서\ 를 사용했지만, 실제로 저렇게 multi line 으로 작성하면 오류난다.
1줄로 작성해야함.

이런 테스트를 할때 브라우저 cache 때문에 고생하는 경우가 참 많다.
redirect 걸리는 것들은 '강력 새로고침' 같은것도 하기 어려워서 ㅠㅠ




[바로가기 링크] : http://coolx.net/cboard/computer/494



swindler haproxy 구버전에서는 capture.req.uri 형태가 다름. 2018-02-27
Name
Password
Comment
Copyright © 1999-2017, swindler. All rights reserved. 367,611 visitor ( 1999.1.8-2004.5.26 ), 2,405,771 ( -2017.01.31)

  2HLAB   2HLAB_Blog   RedToolBox   Omil   Omil_Blog