【发布时间】:2020-06-17 14:21:24
【问题描述】:
我在我的网站根文件夹中创建了一个文件 buy.php,并在这个文件中创建了 webservice。
当我使用 buy.php/book 调用 API 时,它会返回结果。这里 /buy.php 是文件路径,book 是函数名。
但我想使用购买/预订来调用此 API。但它没有给我显示的结果此外,在尝试使用 ErrorDocument 处理请求时遇到了 500 Internal Server Error 错误。
它以前运行良好突然停止它可以通过.htaccess处理请帮助我
感谢问候
这是我的 .htaccess
Options -MultiViews
RewriteEngine on
# skip all files and directories from rewrite rules below
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]
# add php if possible
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^ %{REQUEST_URI}.php [L]
# rewrite other to index.php file
RewriteRule ^ /index.php [L]
【问题讨论】:
标签: php api .htaccess server core