I've discovered an unwanted behaviour in one of my projects. This was not used to be so, Google indexed a url with index.php in it and gave a duplicate canonical notification. It happend on a URL like this: https: https: After I noticed it, I want to other known Laravel projects and discovered the same. https: https: And also on the Laravel website self.
removeIndexPhpFromUrl(); } protected function removeIndexPhpFromUrl() { if (Str::contains(request()->getRequestUri(), '/index.php/')) { $url = str_replace('index.php/', '', request()->getRequestUri()); if (strlen($url) > 0) { header("Location: $url", true, 301); exit; }} }}