charlyghislaindotcom/docker/httpd.conf
2021-02-15 03:16:34 +01:00

27 lines
667 B
ApacheConf

DocumentRoot /var/www/
<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 %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# If for an existing subpath, redirect to index
RewriteCond %{REQUEST_URI} "^/en/"
RewriteRule ^ /en/index.html [L]
RewriteCond %{REQUEST_URI} "^/fr/"
RewriteRule ^ /fr/index.html [L]
# If the requested resource doesn't exist, use index.html
RewriteRule ^ /fr/ [L,R]
</Directory>