301 redirect to AJAX - redirected?

I have an AJAX call for a server endpoint that redirects 301 to the same page, but with a trailing slash.

Is the browser supported for call forwarding when called using AJAX or is it ignored? In my case, it does not follow them, but I decided that it could be something from the server configuration.

+5
source share
4 answers

If you use jquery, you can consider the questions below to implement it. By default, jQuery (and most libraries with Ajax) do not follow the default redirects:

How to manage redirect request after jQuery Ajax call

ajax, jQuery

jquery ajax redirect

+4

, , 301 ajax. :

apache rewrite :

RewriteRule ^([^/]\w+)/?$ index.php?%{QUERY_STRING} [L,E=MODULE:$1]

URL- XHR- :

/this/is/a/canonical/url + '?param=1&param=2...'

301, (f.i. *.php) URL- ( f.i. *.php).

, / URL- XHR-Request, :

/this/is/a/canonical/url + '/' + '?param=1&param=2...'

, -.

+3

, ... Web.Config, , , AJAX. POSTING GetResults ( 301), ( - ?) getresults GET, 404.

, - .

+2

jQuery API doc (http://api.jquery.com/jQuery.ajax/), async:false ( ) - dataType: "jsonp".

-1

All Articles