301 Redirecting /index.php ?

Discussion in 'Search Engine Optimization' started by touchAshley, Sep 6, 2008.

  1. #1
    My forum is located in the root directory (www.mysite.com) One of the first things I always do is redirect the non-www. to www. I ALSO did a redirect from www.mysite.com/index.php (homepage as well) to www.mysite.com. So I obviously want my homepage to just be www.mysite.com !

    After submitting a sitemap to google, I got a warning about the redirect /index.php

    The funny thing is, the /index.php version of my site is a google PR1 and the regular www.mysite.com has no PR. So I'm looking for a solution here. What should I do? how would I redirect the non-www AND the regular www version of my site to the www.mysite.com/index.php version??


    Thanks!
     
    touchAshley, Sep 6, 2008 IP
  2. sadiqsaad

    sadiqsaad Peon

    Messages:
    405
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I have the same question. My forum's index.php has a PR however /forum/ has no PR. Please guide us what to do. Should we redirect index.php to /

    Thx
     
    sadiqsaad, Oct 10, 2008 IP
  3. touchAshley

    touchAshley Active Member

    Messages:
    1,762
    Likes Received:
    85
    Best Answers:
    0
    Trophy Points:
    90
    #3
    sadiqsaad, I resolved this problem.

    What I did was, I edited my sitemap so that the homepage is just www.mysite.com instead of www.mysite.com/index.php. Google doesn't like 301 redirects in your sitemap, so that's why I got the warning in google webmaster tools. I kept my 301 redirect from /index.php to www.mysite.com and the /index.php page rank transferred over to the regular www.mysite.com. no more warnings or errors and I got my PR.

    What forum and sitemap mod do you use? Are you getting a warning in googles webmaster tools? Here is what I have in my .htaccess file:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^musiciansplaza.com
    RewriteRule (.*) http://www.musiciansplaza.com/$1 [R=301,L]
    
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
    RewriteRule ^index\.php$ http://www.musiciansplaza.com/ [R=301,L]
    Code (markup):
    As you can see, I'm redirecting from non-www. to www. and I'm also redirecting /index.php to non-/index.php and I have no problems because my SITEMAP doesn't show any 301 redirects :)
     
    touchAshley, Oct 10, 2008 IP
  4. sadiqsaad

    sadiqsaad Peon

    Messages:
    405
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hey thx for the reply bro. No I have no problems with sitemap. I am using myBB and some sitemap generator which I got from myBB forums.

    BTW I am redirecting www to non-www.
     
    sadiqsaad, Oct 10, 2008 IP