PR index.php vs PR index.html

Discussion in 'Websites' started by Johnburk, May 30, 2006.

  1. #1
    I have a site that has a index.php and a index.html page.

    The strange thing is that the index.php has a PR 5, while the index.html has a PR 3

    I would like to strart the site with www.mysite.com and then its PR 3
    If I type www.mysite.com/index.php it is PR5

    How do I get the PR 5 but have the browser display www.mysite.com
     
    Johnburk, May 30, 2006 IP
  2. mdvaldosta

    mdvaldosta Peon

    Messages:
    4,079
    Likes Received:
    362
    Best Answers:
    0
    Trophy Points:
    0
    #2
    An important step in any SEO work is ensure all your internal pages and external pages point to the same homepage.

    www.mysite.com
    www.mysite.com/
    www.mysite.com/index.php
    www.mysite.com/index.html
    http://mysite.com
    http://mysite.com/
    http://mysite.com/index.php
    http://mysite.com/index.html

    For you those all will bring up the same page, but to Google (and other search engines) those are all different pages and so are the backlinks going to them. To maximize PR and your internal linking power they all need to be the same. Change all internal navigation to point to just one address, usually this would be http://www.mysite.com/ and then setup a 301 redirect to get all links out of your control (like incoming links) going to the same place.
    http://mysite.com Matt Cutts wrote a nice article on the issue a few weeks back.

    Here is a good link I found that can help you with the redirect code. I prefer the mod_rewrite method myself.
     
    mdvaldosta, May 30, 2006 IP
  3. VegasMack

    VegasMack Peon

    Messages:
    110
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can’t have the PR from one page and the information from the other page without a mod_rewrite.

    Why not consider changing your default home page on your server to your php page? It will then default to www.mysite.com with a PR5.

    ~VegasMack
     
    VegasMack, May 30, 2006 IP
  4. mdvaldosta

    mdvaldosta Peon

    Messages:
    4,079
    Likes Received:
    362
    Best Answers:
    0
    Trophy Points:
    0
    #4
    That won't work, the PR belongs to the web address not the web page (assuming your talking about an .htaccess line to set index.php to be home, in that case the address will still be root). All you can do is either redirect all pages to the highest PR page (maybe what your were talking about) or (better yet) redirect all pages back to the root "/" page and wait for the next toolbar export to get the visible rank where it should be.
     
    mdvaldosta, May 30, 2006 IP
  5. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #5
    Actually, it will work, at least in due course.


    www.domain.com doesn't necessarily point to index.html - it points to whatever the default page is for the site.

    And this can be changed in .htaccess as follows:

    DirectoryIndex index.php
    Code (markup):
    or whatever you want instead of the server default.
     
    minstrel, May 30, 2006 IP
  6. Johnburk

    Johnburk Peon

    Messages:
    777
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I have tried this, yet it still shows PR 3. But when I type the full URL www.mysite.com/index.php it is PR 5
     
    Johnburk, May 31, 2006 IP
  7. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #7
    Wait for the toolbar update.
     
    minstrel, May 31, 2006 IP
  8. Johnburk

    Johnburk Peon

    Messages:
    777
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Johnburk, May 31, 2006 IP
  9. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Use this in your htaccess.

    RewriteEngine on
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php3\ HTTP/ 
    RewriteRule ^index\.php3$ http://www.domain.co.uk [R=301,L] 
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/ 
    RewriteRule ^index\.html$ http://www.domain.co.uk [R=301,L] 
    RewriteCond %{HTTP_HOST} ^domain.co.uk
    RewriteRule (.*) http://www.domain.co.uk/$1 [R=301,L]
    Code (markup):
     
    mad4, May 31, 2006 IP