I want to be able to remove index.php URL from google's search listing, you may be able to see this when searching the website title (with or without a space between). On the second page for me it shows my website however the URL has index.php on the end!
I have edited the httpd.conf to remove index.php from the end of my URL, below you can see what I have:
<VirtualHost *:80>
ServerName joemethven.com
DocumentRoot /var/www/html/joemethven/
</VirtualHost>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
RewriteRule ^([^\.]+)$ $1.html [NC,L]
Why is Google picking up index.php when the website loads with joemethven.com? Is there a way I can prevent this?!
Thanks for reading, hope someone can help! :)
Update: I just quickly added a .htaccess within the folder of my website with the below information:
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
I don't know if this will make any changes, however my other servers running websites without this issue had this information in their .htaccess file.