homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Google / Google SEO News and Discussion
Forum Library, Charter, Moderators: Robert Charlton & aakk9999 & brotherhood of lan & goodroi

Google SEO News and Discussion Forum

Redirecting example.com/index.php to example.com
Google thinks they are separate pages

 3:03 am on Sep 14, 2006 (gmt 0)

It seems that google treats www.wexample.com and www.example.com/index.php as two separate entities. One has PR5 and the other has PR4. Does anybody know how can i effectively redirect index.php to the root(www.example.com)?

[edited by: tedster at 4:14 am (utc) on Sep. 14, 2006]
[edit reason] use example.com [/edit]



 4:30 am on Sep 14, 2006 (gmt 0)

You're correct that these are two different URLs and if both are indexed in Google you can get "split PR".

Assuming you are on an Apache server, here's a thread with a Rewrite solution [webmasterworld.com] from jdMorgan that you can use in your .htaccess file:

# mod_rewrite setup
Options +FollowSymLinks
RewriteEngine on
# Redirect direct client /index.html requests to "/" (does not affect DirectoryIndex accesses)
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html
RewriteRule ^index\.html$ http://example.com/ [R=301,L]


 3:15 pm on Sep 15, 2006 (gmt 0)


Is this also a possibility on IIS? I have a site where both http://www.example.com/default.aspx and http://www.example.com/ are listed.
The problem is that IIS adds the default.aspx automatically as the defaukt document, otherwise it does not know where the results from http://www.example.com/ are supposed to come from.
I cannot find any difference in the request header or content between the requests for both pages.


 4:41 pm on Sep 15, 2006 (gmt 0)

It looks is working fine to me in this way:

header( "HTTP/1.1 301 Moved Permanently" );
header( "Status: 301 Moved Permanently" );


 7:23 pm on Sep 16, 2006 (gmt 0)

For IIS it is even worse, you have yet more duplicates at /Default.asp and /default.ASP and many others, etc.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Google / Google SEO News and Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved