Does this count as dupe content? / vs /index.php

Discussion in 'Search Engine Optimization' started by nddb, Oct 18, 2006.

  1. #1
    www.nddb.net <-- shows sup in google.. PR1 or PR5 (moving to 1)
    www.nddb.net/index.php <-- does not show supp. PR0

    Should I redirect /index.php to / or something? This is weird. Does this count as dupe content? Does this matter at all?

    Thanks!!!
     
    nddb, Oct 18, 2006 IP
  2. visio

    visio Well-Known Member

    Messages:
    1,838
    Likes Received:
    91
    Best Answers:
    0
    Trophy Points:
    185
    #2
    visio, Oct 18, 2006 IP
  3. nddb

    nddb Peon

    Messages:
    803
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I got some funky redirects, that is not working well.. doh. :(

    The problem is, I had scripts that need variables that are passed to index.php.

    It looks like "/index.php?blah&blah" hits that redirect and displays the variables.

    I need to only redirect index.php when there is nothing after it. That page you link to SEEMS like it should do that, however I get a 500 error.

    Know how to redirect just "/index.php" with no variables or anything after it?

    Thanks
     
    nddb, Oct 18, 2006 IP
  4. visio

    visio Well-Known Member

    Messages:
    1,838
    Likes Received:
    91
    Best Answers:
    0
    Trophy Points:
    185
    #4
    Don't use any other kind of redirect it won't work the same and can cause troble. always use a 301.

    Options +FollowSymLinks
    RewriteEngine on
    # index.php to /
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
    RewriteRule ^(.*)index\.php$ /$1 [R=301, L]



    That should work but if it doesn't contact your host and ask them to do it.
     
    visio, Oct 18, 2006 IP
  5. nddb

    nddb Peon

    Messages:
    803
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Found the 500 error :
    
      RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
      RewriteRule ^(.*)index\.php$ /$1 [R=301,L]
    
    Code (markup):
    Note the lack of the space in "{3,9}" ... DOH! Someone might want to fix that. =) But that is actually a very ingenious way to do it, since most people are passing variables to index.php, even if the URLs are clean, on the backend mod_rewrite is passing vars. Very nice.. thanks!!
     
    nddb, Oct 18, 2006 IP
  6. visio

    visio Well-Known Member

    Messages:
    1,838
    Likes Received:
    91
    Best Answers:
    0
    Trophy Points:
    185
    #6
    So I take it worked for you after you fixed that? Becuase I just tryed it on one of my sites with the space removed and it still gives me 500 error allthough it is used on one of my other sites :confused:
     
    visio, Oct 18, 2006 IP
  7. nddb

    nddb Peon

    Messages:
    803
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You using apache? A space should be a delimiter in that line. With an unescaped space (i.e. "{3, 9}") it gives me this error : /html/.htaccess: RewriteCond: bad flag delimiters

    Because it expects the next space to be the delimiter between the rule and te flags (i.e. [R=301,L]). I assume that's what is going on.. without the space it works fine.
     
    nddb, Oct 18, 2006 IP
  8. visio

    visio Well-Known Member

    Messages:
    1,838
    Likes Received:
    91
    Best Answers:
    0
    Trophy Points:
    185
    #8
    Hmm okay I see. Wonder why my one site gives me a 500 error and the other site hosted on the same linux server works find. lol
     
    visio, Oct 18, 2006 IP
  9. nddb

    nddb Peon

    Messages:
    803
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I don't know.. but that is bizarre. =)
     
    nddb, Oct 18, 2006 IP