admin管理员组文章数量:1291188
I am trying to get an ajax response on WordPress, currently, it's showing me a 404 error on the staging server but on dev it's working fine.
I know the problem is due to the use of "forward-slash(/)" in the URL on staging but on dev it's working with or without forward-slash just after admin-ajax.php. Please check the below URL so that you all can understand this in detail
Staging Environment:
URL NOT WORKING(with / ) on staging:
staging/wp-admin/admin-ajax.php/category/movies/?action=get_movies?action=get_my_post
URL WORKING WITHOUT ( / ) on staging:
staging/wp-admin/admin-ajax.php/category/movies/?action=get_my_post
Dev Environment:
URL WORKING(with / ) on staging:
staging/wp-admin/admin-ajax.php/category/movies//?action=get_my_post
URL WORKING WITHOUT ( / ) on staging:
staging/wp-admin/admin-ajax.php/category/movies/?action=get_my_post
as you can see if I remove forward-slash after admin-ajax.php it's working fine on staging but with a forward-slash , it's not working, where is dev environment it's working with our without forward-slash
Ajax code:
function get_movies()
{
require_once themespro_classifier_addon_template_exsits('movies/templates/grid');
get_search_tems( $category_for_push ,$paged);
wp_die();
}
本文标签: pluginsFacing Problem with adminajaxphp URLGetting 404 with AJAX call
版权声明:本文标题:plugins - Facing Problem with admin-ajax.php URL - Getting 404 with AJAX call 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741499237a2381980.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论