我正在使用 wai-app-static 静态包来服务一个小型网站。最初我将其称为:
staticApp defaultFileServerSettings root
世界上一切都很好。不过,我想改用 defaultWebAppSettings(因为这是一个网站)。我能够让它工作,所以如果我去http://localhost:3000/index.html
,那很好,但我还需要设置从根文件夹到索引站点(即http://localhost:3000 --> http://localhost:3000/index.html
)的重定向。
根据我在代码中看到的内容,我尝试了以下几种变体:
(defaultWebAppSettings root) { ssIndices = map unsafeToPiece ["index.html"],
ssRedirectToIndex = True }
我能够编译和运行服务器,但我无法让重定向工作。
任何指示或想法将不胜感激!
谢谢