This commit is contained in:
cghislai 2021-02-15 02:36:08 +01:00
parent d1c127d7b7
commit f27c9a6b20

View File

@ -1,6 +1,6 @@
DocumentRoot /var/www/
<Directory "/var/www/fr">
<Directory "/var/www/">
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
@ -12,45 +12,15 @@ DocumentRoot /var/www/
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# If the requested resource doesn't exist, use index.html
RewriteCond %{REQUEST_URI} "!=/fr/index.html" [NC]
RewriteRule ^ /fr/index.html [L]
</Directory>
<Directory "/var/www/en">
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
RewriteEngine on
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# If the requested resource doesn't exist, use index.html
RewriteCond %{REQUEST_URI} "!=/en/index.html" [NC]
# If for an existing subpath, redirect to index
RewriteCond %{REQUEST_URI} "=^/en/.*"
RewriteRule ^ /en/index.html [L]
</Directory>
<Directory "/var/www">
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
RewriteEngine on
# If an existing asset or directory is requested go to it as it is
RewriteCond %{REQUEST_URI} "^=/fr/"
RewriteCond %{REQUEST_URI} "^=/en/"
RewriteRule ^ - [L]
RewriteRule ^ /fr/ [L,R]
RewriteCond %{REQUEST_URI} "=^/fr/.*"
RewriteRule ^ /fr/index.html [L]
# If the requested resource doesn't exist, use index.html
RewriteRule ^ /fr/ [L, R]
</Directory>