I need to redirect for several domains from http://www. to http://. in laravel5.6 app

Posted 4 months ago by Ford555

Hello,

i have 3 domains example.es , example.cat and example.com whith same code. And i need for seo quit the alias www (redirect it without www)

example http://www.example.com to http://example.com and the same with the others.

┬┐whats the best for do it in laravel5.6 application?

  1. .htaccess??? i tried something but it doesnt works 2)middleware??? how?

can someone put the code i need, thank you!

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.