Skip to content

Commit 9818381

Browse files
authored
Update LaravelLocalizationRedirectFilter.php
It is better for SEO to redirect users based on their language with a 302 redirect instead of a 301.
1 parent dd6b891 commit 9818381

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Mcamara/LaravelLocalization/Middleware/LaravelLocalizationRedirectFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function handle( $request, Closure $next )
4545
// Save any flashed data for redirect
4646
app('session')->reflash();
4747

48-
return new RedirectResponse($redirection, 301, [ 'Vary' => 'Accept-Language' ]);
48+
return new RedirectResponse($redirection, 302, [ 'Vary' => 'Accept-Language' ]);
4949
}
5050
}
5151

0 commit comments

Comments
 (0)