ホームページ  >  に質問  >  本文

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_u15822713日前725

全員に返信(2)返信します

  • 大家讲道理

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

    自分で解決しました

    リーリー

    返事
    0
  • PHP中文网

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

    これは書き換えではなく、ジャンプと呼ぶべきです。$host = 'abc.ccav.com'、^/(.*)$ http://www.ccav.com/$1 Permanent; の場合、301 を実行できます。アイデアそれです

    返事
    0
  • キャンセル返事