Apache Lumen公用文件夹中的Vue仪表板使用.htaccess重定向
有一个Lumen应用程序,前端和后端都是静态应用程序,都放在公共目录中,我想在后端应用程序(公用文件夹名称Apache Lumen公用文件夹中的Vue仪表板使用.htaccess重定向,apache,vue.js,redirect,static,lumen,Apache,Vue.js,Redirect,Static,Lumen,有一个Lumen应用程序,前端和后端都是静态应用程序,都放在公共目录中,我想在后端应用程序(公用文件夹名称仪表板)的情况下重定向到index.html,因为它使用vue路由器和jwt身份验证。 我添加了以下.htaccess到后端应用程序,但不起作用 <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /dashboard/ RewriteRule ^index\.html$ - [L] RewriteCond %{RE
仪表板
)的情况下重定向到index.html,因为它使用vue路由器和jwt身份验证。
我添加了以下.htaccess到后端应用程序,但不起作用
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /dashboard/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
重新启动发动机
基础/仪表板/
重写规则^index\.html$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.html[L]
在应用程序的顶部,我有另一个用于Lumen的.htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
选项-多视图-索引
重新启动发动机
#句柄授权头
RewriteCond%{HTTP:Authorization}。
重写规则。*-[E=HTTP\U授权:%{HTTP:AUTHORIZATION}]
#如果不是文件夹,则重定向尾部斜杠。。。
重写cond%{REQUEST_FILENAME}-D
重写cond%{REQUEST_URI}(+)/$
重写规则^1[L,R=301]
#处理前控制器。。。
重写cond%{REQUEST_FILENAME}-D
重写cond%{REQUEST_FILENAME}-F
重写规则^index.php[L]
这个案子有什么好的情况吗