Hello there,
I am trying to do SEO, specifically, I want to remove duplicate pages.
https://www.laravel.com and https://www.laravel.com/index.php return the same page
Even here in Laracast, just try to add "index.php/" after the domain (in all pages).
For the time being I am doing this things:
adding a check when I print the canonical
if ( strpos( url()->current(), "index.php" ) !== false )
{
return env('APP_URL').$this->slug;
}
adding a noindex in the webpage if the URL contain index.php
<meta name="robots" content="noindex">
and making sure that all the url('some-page') contain a backslash url('/some-page').
These are all temporary workarounds, I rather find a more solid solutions.
All suggestions are welcome.