Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
selectric
Regular
Regular


Joined: Aug 06, 2008
Posts: 65

PostPosted: Tue Jun 02, 2009 12:54 pm Reply with quote

Hello!
I noticed that Google is indexing my .com and my .com/index.php together, which is, the same thing, MAJOR double content. Can anyone help me or direct me on how to use my .htaccess or something to make them to drop the index.php file from their index, and only use my homepage? thanks!
 
View user's profile Send private message
selectric
PostPosted: Tue Jun 02, 2009 1:18 pm Reply with quote

in .htaccess

Under RewriteEngine on

RewriteCond %{THE_REQUEST} ^.*\/index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301,L]
 
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6793
Location: Ha Noi, Viet Nam

PostPosted: Tue Jun 02, 2009 3:29 pm Reply with quote

You would have the same problem with any site as Apache will try to find index.htm, index.html, home.htm, home.html, index.php from the root domain if no file is specified. The exact sequence and number of files it will look for is dependent on the server configuration.

It is far more important to ensure the links either have the www or not in the url and to be consistent with that as search engined do see those as duplicate content.
 
View user's profile Send private message Send e-mail
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6383

PostPosted: Wed Jun 03, 2009 5:07 am Reply with quote

Part of the problem is that many themes and the modules block link Home to the index.php file, rather than to /. Changing that will also help, and it will help your pagerank, too, as Google sees Only registered users can see links on this board! Get registered or login! as different from Only registered users can see links on this board! Get registered or login!

I replaced index.php with / in the upcoming nukeNAV, but, as I said, it still needs to be removed in most themes.

_________________
I google, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©