Answer the question
In order to leave comments, you need to log in
Why doesn't JQuery send data to $_POST when sending a POST request to a url containing Cyrillic escape?
Hello.
I have a problem and I can't find a solution. Please help. Essence of the question. Sending data from the browser to the server:
// c подобным урл $_POST на сервере заполняется данными из $data
var $url = '/category/tag/qweqwe-21321';
// с подобным url $_POST на сервере не заполняется данными из $data, в нем кириллица кодирована encodeURIComponent
$url = '/category/tag/%D0%91%D0%B8%D0%BE%D0%BB%D0%BE%D0%B3%D0%B8%D1%8F';
var $data = {'left_menu_filter': $left_menu_filter, 'ajax-action': 'find-programm'};
$.post({
url: $url,
data: $data,
success: actionAfterSendLeftMenuFormData,
dataType: 'json'
});
left_menu_filter[categoryId]: 50
left_menu_filter[specialization][]: 371
left_menu_filter[price_from]: 2390
left_menu_filter[price_to]: 21900
ajax-action: find-programm
Answer the question
In order to leave comments, you need to log in
In general, the problem turned out to be in the mod_rewrite rules of the Apache web server. Since, when the request was in Cyrillic, not a single rule worked and redirected to 404.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question