我有一个同时使用英语和法语的网站。我使用以下命令来构建应用程序:
ng build --output-path=dist/fr --aot --prod --bh /fr/ --i18n-file=src/locale/messages.fr.xlf --i18n-format=xlf --locale=fr
ng build --output-path=dist/en --aot --prod --bh /en/
Run Code Online (Sandbox Code Playgroud)
我将en和fr文件夹都复制到 Web 根目录。每个文件夹都有自己.htaccess的如下:
<IfModule mod_rewrite.c>
Options Indexes FollowSymLinks
RewriteEngine On
RewriteBase /crisis-center/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
Run Code Online (Sandbox Code Playgroud)
我还在.htaccess网络根目录中添加了一个:
<IfModule mod_rewrite.c>
Options Indexes FollowSymLinks
RewriteEngine On
RewriteBase /crisis-center/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP:Accept-Language} ^fr [NC]
RewriteRule ^$ /fr/ …Run Code Online (Sandbox Code Playgroud) 有没有一种方法可以保存每个面板当前的拆分面板布局和配置文件,这样我就不需要再次一个接一个地拆分和打开配置文件?