diff --git a/code/SingleLocaleDomain.php b/code/SingleLocaleDomain.php index 2792919..f03105c 100644 --- a/code/SingleLocaleDomain.php +++ b/code/SingleLocaleDomain.php @@ -37,9 +37,9 @@ public function addIgnoredURLSegment($urlSegment=null){ * different than the detected locale of the domain. * * 3 Things to be aware of (while developing.. these are all accounted for here): - * ¥ Intended Locale of the Domain (.fr, .de, .com?) - * ¥ Page's Locale in the Database - * ¥ i18n locale that is in the header. + * � Intended Locale of the Domain (.fr, .de, .com?) + * � Page's Locale in the Database + * � i18n locale that is in the header. * */ @@ -63,7 +63,11 @@ public function contentcontrollerInit(){ } else { //otherwise, find requested page by url, determine locale, and put us in the right domain. $newUrl = TranslatableDomains::convertLocaleToTLD($withEndSlash=false).$this->owner->Link(); - Director::redirect($newUrl); + // redirect only if specific domain is set for locale allows 'catch-all' + // behaviour (on default domain) --> how to set default domain? + if( TranslatableDomains::convertLocaleToTLD(false) ){ + Director::redirect($newUrl); + } } } else i18n::set_locale($this->owner->Locale); }