Ajax request returns 404, but URL works fine

I am making a jQuery ajax call to an XML page on my CakePHP site. For some strange reason, CakePHP returns a 404 error when I make an ajax call, but there is no problem with the URL directly at http://imgfave.com/gragland/rss ,

You can see this problem by clicking the link on my test page: http://imgfave.com/ajaxtest

The error page says: "The requested address / gragland / rss" was not found on this server. "

Why did CakePHP have a problem returning the page only when fetching through ajax?

+3
source share
2 answers

FireBug, :

X-Requested-With XMLHttpRequest

AJAX.

P.S.: RSS

+2

, . html . AJAX 404.

+1

Source: https://habr.com/ru/post/1722750/


All Articles