Skip to content

Commit

Permalink
fix for redirecting to external URL when under a language getgrav#339
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Oct 14, 2015
1 parent d1e7ec2 commit f47d3fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Grav.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public function redirectLangSafe($route, $code = 303)
/** @var Language $language */
$language = $this['language'];

if ($language->enabled() && $language->isIncludeDefaultLanguage()) {
if (!$this['uri']->isExternal($route) && $language->enabled() && $language->isIncludeDefaultLanguage()) {
return $this->redirect($language->getLanguage() . $route, $code);
} else {
return $this->redirect($route);
Expand Down

0 comments on commit f47d3fa

Please sign in to comment.