提交像/ home / ahmad / local这样的路径

时间:2013-12-28 09:58:16

标签: php restler swagger

Hi Restler / Swagger朋友

当我发布以下网址时出现问题:/ home / ahmad / local

它返回以下错误:

Request URL

http://s1/RestlerUpdate/complextypestests/_url/%2Fhome%2Fahmad%2Flocal

Response Body
   [unable to parse as json; raw response below]

Not Found

The requested URL /RestlerUpdate/complextypestests/_url//home/ahmad/local was not found on this server.

Response Code
404

如何在不使用编码的情况下提交网址?

我的测试代码是:

class Type{
   /**
     * POST url
     *
     * @param string $url {@type string}
     * @return string
     */
    function post_url($url) {
        return $url;
    }
}

我的项目结构如下:

myproject
  |
  ----explorer
  |
  ---vendor
  |
  ---api2params.php (contain class Type)
  |
  ---index.php
  |
  --- .htaccess

.htaccess如下:

DirectoryIndex index.php
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^$ index.php [QSA,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
<ifModule mod_php5.c>
    php_flag display_errors On
</IfModule>

0 个答案:

没有答案