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