システムには、特定の URL リンク アドレスを別のアドレスに転送するという要件があります。モデルは
に似ています。
localhost/wish/1234.jhtml は自動(dòng)的に localhost/community/detail/1234.jhtml に移動(dòng)します。
現(xiàn)在、私の Nginx の設(shè)定記述方法は次のとおりです。
場(chǎng)所 ~ ^/願(yuàn)い/$ {
^/(.*)$ ^/community/detail/$1 Permanent;
を書き換えます。
}
設(shè)定ファイルの記述が間違っていますので、location に置く必要はありません。 rewrite ^/wish/(.*).jhtml$ /community/detail/.jhtml permanent;