du4373 2018-04-06 08:37
浏览 106
已采纳

从本地服务器移动到生存后错误410消失

I have created a site and everything is working fine locally in WAMP, however, I moved everything to my shared hosting account and am getting a 410 error:

Gone
The requested resource
/admin/product_edit_parse.php
is no longer available on this server and there is no forwarding address. Please remove all references to this resource.

Additionally, a 410 Gone error was encountered while trying to use an ErrorDocument to handle the request.

I moved all files and everything else seems to be working so far except for this one file. This file is not actually viewable anywhere it is on the admin side of my site for editing products. My site sends a HTTP request to this page and gets a response via AJAX like so:

var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function(){
    if(this.readyState == 4 && this.status == 200){
        console.log(this.responseText);
    }
};
xmlhttp.open("POST", query_string, true);
xmlhttp.send();

I can only see the 410 error in the console when nothing happens.

If I go directly to the pages URL with the query string attached (admin/product_edit_parse.php?foo=bar&bar=foo) it gives me the same error.

However, if I go to the URL with out the query string I get a time out error:

This site can’t be reached
************** took too long to respond.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_TIMED_OUT

//-------------------EDIT-------------------\

This is how I'm building my query string

$("#product_edit_submit").on("click", function(){
    var product_id = $("#product_id").val();
    var product_name = $("#product_name").val();
    var product_sort = $("#product_sort").val();
    var product_category = $("#product_category").val();
    var product_attribute = $("#product_attribute").val();
    var product_description = richTextField.document.getElementsByTagName('body')[0].innerHTML;
    product_description = product_description.replace(/"/g,"");
    product_description = product_description.replace(/ /g,"");
    var product_supplier = $("#product_supplier").val();
    var product_model_no = $("#product_model_no").val();
    var product_cost = $("#product_cost").val();
    var product_meta = $("#product_meta").val();
    var spec_1 = $("#spec_1").val();
    var spec_2 = $("#spec_2").val();
    var spec_3 = $("#spec_3").val();
    var spec_4 = $("#spec_4").val();
    var spec_5 = $("#spec_5").val();
    var spec_6 = $("#spec_6").val();
    var spec_7 = $("#spec_7").val();
    var spec_8 = $("#spec_8").val();
    var spec_9 = $("#spec_9").val();
    var spec_10 = $("#spec_10").val();
    var spec_11 = $("#spec_11").val();
    var spec_12 = $("#spec_12").val();
    var spec_13 = $("#spec_13").val();
    var spec_14 = $("#spec_14").val();
    var spec_15 = $("#spec_15").val();

    var value_1 = $("#value_1").val();
    var value_2 = $("#value_2").val();
    var value_3 = $("#value_3").val();
    var value_4 = $("#value_4").val();
    var value_5 = $("#value_5").val();
    var value_6 = $("#value_6").val();
    var value_7 = $("#value_7").val();
    var value_8 = $("#value_8").val();
    var value_9 = $("#value_9").val();
    var value_10 = $("#value_10").val();
    var value_11 = $("#value_11").val();
    var value_12 = $("#value_12").val();
    var value_13 = $("#value_13").val();
    var value_14 = $("#value_14").val();
    var value_15 = $("#value_15").val();

    var pricing = [];
    for (i = 0; i <15; i++) {
        var checkbox = "checkbox"+i;
        if ($("#"+checkbox).is(':checked')) {
            for (j = 1; j <=2; j++) {
                var priceValue = 'priceValue'+i+'_'+j;
                var priceCurrency = 'priceCurrency'+i+'_'+j;
                var priceAttribute = 'priceAttribute'+i+'_'+j;
                var value = $('#'+priceValue).val();
                var currency = $('#'+priceCurrency).val();
                var attribute = $('#'+priceAttribute).val();
                var item = [];
                item.push(value);
                item.push(currency);
                item.push(attribute);
                pricing.push('item'+item);
            }
        }
    }

    var formData = new FormData();
    formData.append("product_image_1", document.getElementById("product_image_1").files[0]);
    formData.append("product_image_2", document.getElementById("product_image_2").files[0]);
    formData.append("product_image_3", document.getElementById("product_image_3").files[0]);
    formData.append("product_image_4", document.getElementById("product_image_4").files[0]);
    formData.append("product_image_5", document.getElementById("product_image_5").files[0]);

    var query_string = "product_edit_parse.php?";
    query_string += "id="+encodeURIComponent(product_id);
    query_string += "&name="+encodeURIComponent(product_name);
    query_string += "&sort="+encodeURIComponent(product_sort);
    query_string += "&cat="+encodeURIComponent(product_category);
    query_string += "&att="+encodeURIComponent(product_attribute);
    query_string += "&desc="+encodeURIComponent(product_description);
    query_string += "&supp="+encodeURIComponent(product_supplier);
    query_string += "&mono="+encodeURIComponent(product_model_no);
    query_string += "&cost="+encodeURIComponent(product_cost);
    query_string += "&meta="+encodeURIComponent(product_meta);

    query_string += "&spec_1="+spec_1;
    query_string += "&spec_2="+spec_2;
    query_string += "&spec_3="+spec_3;
    query_string += "&spec_4="+spec_4;
    query_string += "&spec_5="+spec_5;
    query_string += "&spec_6="+spec_6;
    query_string += "&spec_7="+spec_7;
    query_string += "&spec_8="+spec_8;
    query_string += "&spec_9="+spec_9;
    query_string += "&spec_10="+spec_10;
    query_string += "&spec_11="+spec_11;
    query_string += "&spec_12="+spec_12;
    query_string += "&spec_13="+spec_13;
    query_string += "&spec_14="+spec_14;
    query_string += "&spec_15="+spec_15;

    query_string += "&value_1="+value_1;
    query_string += "&value_2="+value_2;
    query_string += "&value_3="+value_3;
    query_string += "&value_4="+value_4;
    query_string += "&value_5="+value_5;
    query_string += "&value_6="+value_6;
    query_string += "&value_7="+value_7;
    query_string += "&value_8="+value_8;
    query_string += "&value_9="+value_9;
    query_string += "&value_10="+value_10;
    query_string += "&value_11="+value_11;
    query_string += "&value_12="+value_12;
    query_string += "&value_13="+value_13;
    query_string += "&value_14="+value_14;
    query_string += "&value_15="+value_15;

    query_string += "&price_array="+pricing;
    console.log(query_string);

    var xmlhttp = new XMLHttpRequest();
    xmlhttp.onreadystatechange = function(){
        if(this.readyState == 4 && this.status == 200){
            console.log(this.responseText);
        }
    };
    xmlhttp.open("POST", query_string, true);
    xmlhttp.send(formData);
});

console.log(query_string); returns:

product_edit_parse.php?id=1&name=TPM%200.1-Lifting%20Magnet%20100kg&sort=1&cat=1&att=1&desc=%0A%09%09%20%3Cp%3ETPM%200.1%20Permanent%20Lifting%20Magnet%20Capacity%3A%20100kg%3C%2Fp%3E%20%3Cstyle%20type%3D%22text%2Fcss%22%20xml%3D%22space%22%3E%3C!--%20p.p1%20%7Bmargin%3A%200.0px%200.0px%200.0px%200.0px%3B%20font%3A%208.0px%20Times%7D%20p.p2%20%7Bmargin%3A%200.0px%200.0px%200.0px%200.0px%3B%20font%3A%2010.0px%20Times%7D%20--%3E%3C%2Fstyle%3E%20%3Cp%3ETPM%20permanent%20lifting%20magnets%20are%20ideal%20tools%20for%20easy%2C%20quick%20and%20economical%20transport%20of%20heavy%20objects%20made%20from%20ferro-magnetic%20material.%20Typical%20operating%20areas%20are%20workshops%20and%20warehouses%2Cloading%20and%20unloading%20of%20machines%20as%20well%20as%20construction%20of%20jigs%20and%20fixtures.%3C%2Fp%3E%20%3Cp%3E%3Cspan%20class%3D%22Apple-converted-space%22%3E%3C%2Fspan%3EFactors%20that%20reduce%20the%20magnetic%20clamping%20force%3A%3C%2Fp%3E%20%3Cp%3EAir%20gap%3A%20High%20magnetic%20forces%20created%20by%20the%20TPM%20allow%20the%20magnet%20to%20clamp%20components%20through%20the%20air%20gap%2C%20however%2C%20air%20gaps%20will%20reduce%20the%20magnetic%20performance%20as%20they%20provide%20a%20barrier%20between%20the%20contact%20surfaces.%20Air%20gaps%20occur%20in%20a%20number%20of%20different%20ways%20such%20as%20paint%2C%20dust%20and%20heavy%20mill%20scale.%20Poorly%20machined%20surfaces%20also%20constitute%20an%20air%20gap.%20Please%20down%20rate%20the%20magnet%20capacity%20in%20accordance%20with%20the%20adhesive%20force%2Fair%20gap%20diagram%20below.%3C%2Fp%3E%20%3Cp%3EMaterial%20thickness%3A%20If%20the%20TPM%20is%20used%20to%20lift%20plates%20thinner%20than%20the%20recommended%20minimum%20thickness%2C%20the%20clamping%20forces%20will%20be%20significantly%20reduced.%20Performance%20curves%20can%20be%20identified%20in%20conjunction%20with%20the%20adhesive%20force%2Fflat%20thickness%20diagram%20below%3A%3C%2Fp%3E%20%3Cp%3EContact%20area%3A%20Full%20lifting%20capacity%20can%20only%20be%20achieved%20when%20the%20magnet%20has%20full%20contact%20area%20with%20the%20component%20being%20lifted.%20If%20the%20contact%20surface%20has%20holes%20in%20or%20is%20uneven%20then%20the%20performance%20will%20be%20affected%20accordingly.%20Always%20carry%20out%20a%20trial%20lift%20in%20these%20circumstances%20to%20establish%20correct%20lifting%20before%20transporting%20the%20load.%3C%2Fp%3E%20%3Cp%3EMaterial%20type%3A%20Certain%20materials%20have%20different%20abilities%20to%20carry%20magnetism.%20For%20materials%20other%20than%20mild%20steel%20a%20reduction%20factor%20must%20be%20applied%20in%20order%20to%20calculate%20the%20effective%20clamping%20force.%3C%2Fp%3E%20%3Cp%3ETypical%20values%3A%3C%2Fp%3E%20%3Cp%3EFerrous%20alloy%20steels%200.8%3C%2Fp%3E%20%3Cp%3EHigh%20carbon%20steels%200.7%3C%2Fp%3E%20%3Cp%3ECast%20iron%200.55%3C%2Fp%3E%20%3Cp%3EExamples%20of%20reduced%20WLL%3A%3C%2Fp%3E%20%3Cp%3EMild%20steel%20500g%3C%2Fp%3E%20%3Cp%3ECast%20iron%20500kg%20x%200.55%20%3D%20275kgs%3C%2Fp%3E%0A&supp=&mono=&cost=&meta=&spec_1=&spec_2=&spec_3=&spec_4=&spec_5=&spec_6=&spec_7=&spec_8=&spec_9=&spec_10=&spec_11=&spec_12=&spec_13=&spec_14=&spec_15=&value_1=&value_2=&value_3=&value_4=&value_5=&value_6=&value_7=&value_8=&value_9=&value_10=&value_11=&value_12=&value_13=&value_14=&value_15=&price_array=
  • 写回答

1条回答 默认 最新

  • doushou8299 2018-06-21 10:01
    关注

    This was caused by the shared domain host doing checks for malicious files. Still no straight answer from them about why this was being marked as malicious.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染