charlyghislaindotcom/docker/httpd.conf
2021-02-15 02:20:21 +01:00

57 lines
1.3 KiB
ApacheConf

DocumentRoot /var/www/
<Directory "/var/www/fr">
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} "!=/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]
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]
</Directory>