# BASE_URL can be set and DEFAULT_LANGUAGE can be updated. # Uncomment the following line *only* if the GUI is served from a # subdirectory. The setting here must match the setting in config.ts. # Must start with a slash, but not end with a slash. # Define BASE_URL "/subdirectory" # Undefined by default # Default language must be updated if "defaultLanguage" in config.ts is # changed. Both must match. Define DEFAULT_LANGUAGE "en" # Nothing to set or update below. # DirectoryIndex index.html Alias ${BASE_URL} /var/www/html/zonemaster-web-gui/dist Define API_BASE_URL "${BASE_URL}/api" DocumentRoot /var/www/html/zonemaster-web-gui/dist Define API_BASE_URL "/api" Options Indexes FollowSymLinks AllowOverride None Require all granted RewriteEngine On RewriteBase ${BASE_URL}/ RewriteRule ^$ /${DEFAULT_LANGUAGE} [R] # Rewrite /result/{anything} to {default_language}/result/id/index.html RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^result/[^/]+/?$ ${DEFAULT_LANGUAGE}/result/id/index.html [L] # Rewrite /{lang}/result/{anything} to /{lang}/result/id/index.html RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/result/[^/]+/?$ $1/result/id/index.html [L] ProxyPass http://localhost:5000/ ProxyPassReverse http://localhost:5000/ ProxyPreserveHost On