我的控制器中有代码: [Route("api/deliveryitems/InsertIntoPPTData/{stringifiedRecord}")] ...我正在通过邮递员这样称呼: http://localhost:21609/api/deliveryitems/InsertIntoPPTData? stringifiedRecord=serNum77;tx2;siteNum2;bla2.xml;ppt_user2;tx_memo2;file_beg2;file_end2 ...但是得到: { Message: "No HTTP resource was found that matches the request URI 'http://localhost:21609/api/deliveryitems/InsertIntoPPTData? stringifiedRecord=serNum77;tx2;siteNum2;bla2.
以下是关于 request-uri 的编程技术问答
真的很困难,因为形式和语法看起来不错. RewriteCond for request_uri不匹配显式路径和文件名.隔离时,重新启动request_filename匹配的匹配正好.我已经使用phpinfo()request_uri包含领先的斜线进行了验证,并且也没有领先的斜线进行测试. 这里的目标是知道该请求是针对此文件的,如果不存在,请扔一个410. RewriteCond %{REQUEST_URI} ^/dir1/dir2/dir3/v_9991_0726dd5b5e8dd67a214c0c243436d131_all\.css$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ - [R=410,L] 我不想省略第一个cond,因为我只想为类似于此的文件而执行此操作. 更新i 试图获得确定的测试.测试设置: testmee.txt不存在 请求是root中的testmee.txt
我正在尝试从Google Images搜索结果中保存图像,但是当我在查询字符串参数中发送图像SRC时,会给以下错误: Request-URI Too Long The requested URL's length exceeds the capacity limit for this server. Apache/2.4.18 (Ubuntu) Server at 127.0.1.1 Port 80 当我在本地机器上遇到此错误时,我有可能测试所有人都有的想法. 注意:我在/etc/apache2/apache2.conf文件中确实将LimitRequestLine和LimitRequestFieldSize设置为100000.但是到目前为止没有运气. 任何帮助都将不胜感激. 解决方案 请求参数不能具有无限的长度.我的猜测是,将图像SRC作为查询参数发送时,您达到了最大长度. 来自在这里这个答案似乎您可以将LimitRequestLine>>设置为8
由于$ _server ['request_uri']返回脚本而不是相对路径的完整URL返回完整的URL. 我的环境: Windows 7 64位. XAMPP版本1.8.2 PHP 5.4.16版 apache版本apache/2.4.4(win32)openssl/0.9.8y php/5.4.16 我的虚拟主机conf: DocumentRoot "D:/HTDOCS/ivankristianto" ServerName www.ivankristianto.local UseCanonicalName Off Options Indexes FollowSymLinks MultiViews AllowOverride all Require all granted
我在我的控制器中有这样的代码: [Route(“api / deliveryitems / InsertIntoPPTData / {stringifiedRecord} )] ...我通过Postman调用它: http:// localhost:21609 / api / deliveryitems / InsertIntoPPTData? stringifiedRecord = serNum77; tx2; siteNum2; bla2.xml; ppt_user2; tx_memo2; file_beg2; file_end2 ...但获取: { 消息:“没有找到匹配请求URI的HTTP资源 'http:// localhost:21609 / api / deliveryitems / InsertIntoPPTData?stringifiedRecord = serNum77; tx2; siteNum2