>  Q&A  >  본문

rewrite - nginx 개인화된 도메인 이름에 대한 다시 쓰기 규칙을 찾습니다.

아이디어:
http://abc.ccav.com http://www.ccav.com/uid/abc로 다시 작성
http://abc.ccav.com/article/index/index http://로 다시 작성 www.ccav.com/article/index/index/uid/abc
http://abc.ccav.com/article/index/show/id/1 http://www.ccav.com/article/index로 다시 작성 /show/uid/abc/id/1
http://abc.ccav.com/shop/index/index http://www.ccav.com/shop/index/index/uid/abc
http로 다시 작성: //abc.ccav.com/shop/index/show/id/1 http://www.ccav.com/shop/index/show/uid/abc/id/1
로 다시 작성 실제로 몇번 시도해봤는데 실패했는데 조언 부탁드려요

phpcn_u1582phpcn_u15822712일 전721

모든 응답(2)나는 대답할 것이다

  • 大家讲道理

    大家讲道理2017-05-16 17:25:29

    직접 해결했습니다

    으아악

    회신하다
    0
  • PHP中文网

    PHP中文网2017-05-16 17:25:29

    이것은 다시 작성하는 것이 아닙니다. 점프라고 해야 합니다. $host = 'abc.ccav.com', ^/(.*)$ http://www.ccav.com/일 때 301을 수행할 수 있습니다. $1 영구 사용이 아이디어입니다

    회신하다
    0
  • 취소회신하다