403禁止的错误-执行和Ajax页面 [英] 403 forbidden error -executing and ajax page

查看:114
本文介绍了403禁止的错误-执行和Ajax页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,一切正常.但是,仅当我从php调用ajax页面时,才会出现以下错误.

I am having a website everything works fine.But i am getting the following error only when i call a ajax page page from php.

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access test.php
on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address>Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at salarypayroll.com Port 80</address>
</body></html>

以前工作还不错,只是现在遇到这样的问题.这是什么问题.......? 就像服务器中的任何权限或安全问题.......?

It was working fine before ,just now am facing an issue like this.what would be the problem .......? Is it like any permission or security issue in server .......?

我的功能:

function myfunc(){
 var test = $("#test").val();  


    $.ajax({
        type: 'POST',
        url:   'test.php',
        data:{
            "test" : test,
             },
    success: function(data) 
             {
             /*--------My code-------*/

              }     

      });
}

推荐答案

确保您的主机允许表单帖子中使用http URL.一些主机部署了一个mod_sec规则,该规则可防止通过帖子传递http://网址.

Make sure your host allows http URL in form posts. Some hosts deploy a mod_sec rule which prevents http:// url passed via post.

这篇关于403禁止的错误-执行和Ajax页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆