基于浏览器语言的Firebase托管重写规则 [英] Firebase hosting rewrite rules based on language of browser
问题描述
我有一个Firebase托管的网站,其中包含一个index_fr.html
和index_nl.html
.
如何创建使用用户代理语言提供正确的index_nl
或index_fr
页面(不使用Firebase函数)的重写规则?
I have a Firebase hosted website that contains an index_fr.html
and index_nl.html
.
How can I create a rewrite rules that uses the user agent language to serve the correct index_nl
or index_fr
page (without using Firebase functions)?
推荐答案
Update August 12th, 2020: Firebase Hosting now supports i18n internationalization.
Firebase托管重写仅基于请求的路径. Firebase托管配置中不支持这种条件重写.
Firebase Hosting rewrites are based on the requested path only. There is not support for such conditional rewrites in the Firebase Hosting configuration.
您可能要为其提交功能请求.
You might want to file a feature request for it.
这篇关于基于浏览器语言的Firebase托管重写规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!