我正在尝试使用 @nuxt/pwa starter-template 为共享主机上的服务器端渲染设置 Nuxt 应用程序 . 但是,我的Nuxt应用程序在.htaccess中通过重写规则运行“http://localhost:50000 ". I am trying to show the running app from " http://example.com” .

当试图直接访问“http://example.com " it's showing 404. Without the "索引(/)" route every other route is fine. Even coming to "索引(/)" route from any other route is also OK. Only showing 404 when trying to load the " /”路由时 .

Eg:

http://example.com 不起作用

http://example.com/contact 工作正常

*** Github上已经存在与我的问题完全相同的问题了:https://github.com/nuxt/nuxt.js/issues/2625但我从那里找不到任何有用的东西 .

这是我正在使用的 .htaccess 文件 . -

Options +FollowSymLinks 
<IfModule mod_rewrite.c>

RewriteEngine on

RewriteRule ^(.*) http://127.0.0.1:50000/$1 [P,L]

</IfModule>

有人可以帮我解决这个问题吗???提前致谢!