Slim Framework API-如何为多个.php的存储API配置.htaccess文件
我正在使用slim框架和angular为库系统构建crud api。。但在我的api文件夹中,我想创建多个.php文件。。例如authors.php、publisher.php等,我让authors crud系统工作,我为publisher.php重写了它。。但是它找不到我的数据库记录,也没有给出任何错误。。我强烈感觉到它是我的.htaccess文件。。但是我不知道如何为多个.php文件配置它 这是我当前的.htaccess。。如果有任何帮助,我将不胜感激,因为我是所有这些技术的新手Slim Framework API-如何为多个.php的存储API配置.htaccess文件,php,mysql,angular,api,slim,Php,Mysql,Angular,Api,Slim,我正在使用slim框架和angular为库系统构建crud api。。但在我的api文件夹中,我想创建多个.php文件。。例如authors.php、publisher.php等,我让authors crud系统工作,我为publisher.php重写了它。。但是它找不到我的数据库记录,也没有给出任何错误。。我强烈感觉到它是我的.htaccess文件。。但是我不知道如何为多个.php文件配置它 这是我当前的.htaccess。。如果有任何帮助,我将不胜感激,因为我是所有这些技术的新手 # Rew
# RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ authors.php [QSA,L]
:
Apache:向.htaccess文件添加重写规则,如图所示
:
但是为什么,当你有苗条的时候?
RewriteEngine On
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# If the requested resource doesn't exist, use index.html
RewriteRule ^ /index.html