weixin_33719619 2016-04-20 23:38 采纳率: 0%
浏览 28

PHP:AJAX:获取:错误的URL

I'm moving my application to new server, and have been hitting into some issues lately. PHP version: 5.5.34, Mac OSX Apache 2.4

Laravel version: 4.2

I get a grid but my browser complains for URL.

My ajax requests looks like:

$(grid_name).jqGrid({

    //to get this function working make sure you've .htaccess file  
    //url:'illumina_xhr_get_data', - won't work if not added illumina 
    url:"illumina/illumina_xhr_get_samples",
    //url:"illumina/illumina_xhr_get_samples",
    datatype: "json",
    mtype: "GET",
    jsonReader: {
        repeatitems: false,
        id: "",
        root:  function (obj) {
            return obj;
        },
        records: function (obj) {
            return obj.length;
        },
        page: function () {
            return 1;
        },
        total: function () {
            return 1;
        }
    },

    colNames:['Study','Sample Name','Forward Primer',
            'Reverse Primer','Region','Read Length','Seq Platform', "ID"], //id is hidden.. that is used while making group
    colModel :[ 
               {name:"study_name",sortable: true}, 
               {name: "sample_name",sortable: false},
               {name: "forward_primer",sortable: false},
               {name: "reverse_primer",sortable: false},
               {name:"region",sortable:false},
               {name:"read_length",sortable:false,align:'right'},
               {name:"seq_platform",sortable:false},
               {name:"id",sortable:false,hidden:true}

               ],
        rowNum:10, //this sets the default row in the pager
        caption:"Illumina", //title of the grid
        pager: pager_name,  
        shrinkToFit : false,
        rownumbers: true, //row numbers on left
        multiselect: true, //check box
        height: '400', //height: 'auto',
        width: '1100',
        gridview: true,         
        viewrecords:true, // this is for the View 1 - 8 of 8 \m/
        sortorder:"asc", //asc 
        autoencode: true, //don't know
        sortable:true, //sort
        loadonce: true, //loadonce is must
        rowList:[500,1000,1500], //drop down
        page: 1,
        rowNum: 100,
        ignoreCase: true, //make search as case insenstive -- YAY.. Party
        grouping:true, //this is for grouping
        groupingView : { groupField : ['study_name'], //grouping based on study column
            groupText : ['<b>{0} - {1} Sample(s)</b>'] //this will give count of samples present
             } ///grouping view ends
});

`

Error:

The requested URL /pims/public/illumina/illumina_xhr_get_samples was not found on this server.

My local host points to ~/Sites

The same code works on my other machine (from which I'm transitioning).

I'm unable to figure out a solution to this. Kindly help.

  • 写回答

1条回答 默认 最新

  • weixin_33726318 2016-04-21 15:51
    关注

    I found the solution from: .htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

    I'd to enable re-write module in order to be it read by server.

    I found error in /var/log/apache2/error_log

    Hope it helps someone. Thank you.

    评论

报告相同问题?

悬赏问题

  • ¥15 AT89C51控制8位八段数码管显示时钟。
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口