E
E
elise2018-03-30 06:11:07
Yii
elise, 2018-03-30 06:11:07

Why does ajax in yii2 throw an error?

Good afternoon!
I'm trying to send an ajax request to yii2, but ajax gives an error 301 moved permanently, and only after that it will redirect me to the specified url.
Has anyone experienced this? tell me how to fix it please

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arman, 2018-03-30
@elise

So just guessing, see where and where the redirection comes from, then see why the first URL is being redirected.
So offhand it looks like normalize url, which seems to be enabled by default. Does your ajax address end with "/"?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question