I am using Laravel
Unfortunately Google is picking up the URLs wrong. For example, a page such as: www.domain.co.uk/article/hello-world has been indexed in Google as www.domain.co.uk/public/index.php/article/hello-world.
When you visit the site, all the URLs seem correct and the www.domain.co.uk/article/hello-world URL shows the page as expected, but I guess Google bots are using the .htaccess and viewing the long URL instead
(I had put the public folder which comes with Laravel in public_html)
The .htaccess in public_html has:
RewriteEngine On
Options +FollowSymlinks
Options -Indexes
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) /public/$1 [l]
And there is an additional .htaccess in the public_html/public folder:
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
Does anyone know of any solutions to this issue?
I have tried rewrite rules to redirect the URL when public/index.php is the URL but I am having zero luck. Any tips would be appreciated.