Redirect to root when DefaultContentLanguageInSubdir = false

Fixes #2422
This commit is contained in:
Bjørn Erik Pedersen
2016-09-09 17:40:56 +02:00
parent 4df86a703a
commit 43bf9ed38e
2 changed files with 16 additions and 5 deletions

View File

@@ -93,6 +93,9 @@ func doTestMultiSitesMainLangInRoot(t *testing.T, defaultInSubDir bool) {
if defaultInSubDir {
// should have a redirect on top level.
assertFileContent(t, "public/index.html", true, `<meta http-equiv="refresh" content="0; url=http://example.com/blog/fr" />`)
} else {
// should have redirect back to root
assertFileContent(t, "public/fr/index.html", true, `<meta http-equiv="refresh" content="0; url=http://example.com/blog" />`)
}
assertFileContent(t, "public/fr/index.html", defaultInSubDir, "Home", "Bonjour")
assertFileContent(t, "public/en/index.html", defaultInSubDir, "Home", "Hello")