小编Dan*_*elZ的帖子

如何在 Apache 上托管 Angular 4 多语言?

我有一个同时使用英语和法语的网站。我使用以下命令来构建应用程序:

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)

我将enfr文件夹都复制到 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)

apache multilingual angular

8
推荐指数
0
解决办法
524
查看次数

Windows 终端,如何保存分割窗格布局?

有没有一种方法可以保存每个面板当前的拆分面板布局和配置文件,这样我就不需要再次一个接一个地拆分和打开配置文件?

terminal panel windows-terminal

7
推荐指数
1
解决办法
2408
查看次数