New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
give the ability to choose the redirect type (ex: 301) to improve SEO. #881
Comments
Upvote! This makes sense! @ZakariaTlilani I have a workaround for this: $url = $request->fullUrl(); $appUrl = Env::get('APP_URL'); if (Str::startsWith($path, "/de/")) { Whereas "/de/" is my default locale. But of course a proper solution would be great! Like a config param to set the HTTP code. |
@petrosit yes, this seems one of the good solutions. |
The package uses 302 by default.
|
Is your feature request related to a problem? Please describe.
yes, it is.
When choosing to activate 'hideDefaultLocaleInURL' which removes the default locale short name in the URL (ex: /fr ) and while having a 302 redirect hard coded that means all link are "temporary redirect", the entire website has a duplicate (according to the crawlers -ex: google), which is very harmfull to the websites SEO. the bigger the website the worst the issue gets.
Describe the solution you'd like
i think what would be best is to simply allow the coder to choose by setting another variable in config file.
The text was updated successfully, but these errors were encountered: