1

私の JS コードでは、AJAX 応答で 403 ステータス コードをチェックし、次のようにログイン ページにリダイレクトしています。

$.ajax({
 statusCode: {
   403: function() {
      window.location.href = "/login";
   }
 }
});

次のように、サイトへの完全な URL を使用する必要があります。

 403: function() {
      window.location.href = "www.mysite/login";
   }

それとも、相対的なものを使用するだけで十分ですか?

4

2 に答える 2

3

Using the relative URL should be enough.

于 2012-07-02T15:52:22.183 に答える
0

would it be faster to try with relative url to see if it's working than posting here ?

I think it will work with relative url

于 2012-07-02T15:52:30.563 に答える