0
我试图让html5mode工作,并通过将此添加到我的.htaccess文件中,我能够使其工作。使用REST api编写html5mode的.htaccess文件
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule^- [L]
RewriteRule^index.html [L]
我叫api.php在同一文件夹作为我的index.html文件将处理后端的REST API的PHP文件。
Basicly我想html5mode继续工作,但到例如本地主机/ API/...发送的所有请求api.php
我试了行,但它打破了html5mode。
如果我能弄清楚这一点,那将会很棒。
致以问候