Why is Google listing my pages under strangely jumbled-up URLS

Discussion in 'Site & Server Administration' started by Darden12, Apr 22, 2011.

  1. #1
    Can some please help! I have a music (net radio) site, with a lyrics subdirectory which contains (naturally enough) lyrics.

    Google should be listing these pages as follows:
    http://www.domain.com/lyrics/FILENAME

    Instead, for some reason I can't understand, Google is listing these pages as follows:
    http://www.domain.com/index.php/lyrics/le-diner.html

    What's going on here? How is index.php getting inserted into the URL????
    The only thing I can think of is there's something in my htaccess file causing this?

    Even so, how do I correct the problem correcting the htaccess file? My site is largely invisible because of this glitch.

    Thanks for any ideas.
     
    Darden12, Apr 22, 2011 IP
  2. Darden12

    Darden12 Well-Known Member

    Messages:
    107
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #2
    Darden12, Apr 22, 2011 IP
  3. sojic

    sojic Active Member

    Messages:
    133
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    90
    #3
    Create .htaccess file

    
        RewriteEngine On
        RewriteRule ^(.*)$ index.php?/$1 [L]
    
    Code (markup):
     
    sojic, Apr 23, 2011 IP
  4. Darden12

    Darden12 Well-Known Member

    Messages:
    107
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #4
    Darden12, Apr 23, 2011 IP
  5. sojic

    sojic Active Member

    Messages:
    133
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    90
    #5
    sojic, Apr 23, 2011 IP
  6. Darden12

    Darden12 Well-Known Member

    Messages:
    107
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #6
    When I add that rewrite instruction, it makes other pages of mine load as index.php. I'm not saying this is the script's fault -- but that's what's happening. Maybe there's something else wrong on my end that causes this in combination with the script.

    As far as generating URLS without index.php, that's the whole problem. I don't know how or where that happened in the first place. But thanks for the analysis. I will check the scripts involved and maybe I'll figure out a way in which they could be generating these sorts of links.
     
    Darden12, Apr 24, 2011 IP