所以我在运行一个带有webpack 4开发服务器的react应用程序。我在index.html所在的文件夹中有一个silent-renew.html文件。我需要能够转到localhost:8080/silen-renew,它需要打开HTML文件。但rigt现在每次我访问/sometimg时,它都会使用index.html启动spa。我不能使用proxy,因为它用于/API。看起来han代理不能处理多条路径。
发布于 2021-04-24 09:16:29
考虑使用htaccess file来设置索引文件,如下所示:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com$
RewriteRule ^$ http://example.com/silen-renew.html [L,R=301]https://stackoverflow.com/questions/67238464
复制相似问题