The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

URL issues

Discussion in 'General Discussion' started by MattAtNatwell, Jul 9, 2012.

  1. MattAtNatwell

    MattAtNatwell Member

    Joined:
    Jul 3, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I have a WHM/cPanel server that I've been running for almost a year now, and our SEO account manager just brought up a problem that I haven't found any documentation for as of yet. Here's the issue:

    Say you have a website running PHP under WHM/cPanel. If I go to www.somesite.com/sadlfkajssdf I'd get a 404 error, as expected. But, if I go to a valid PHP file, it will pass garbage as an argument. For example, www.somesite.com/list.php/jhlwtkjerhtlwekrj will show the same thing as www.somesite.com/list.php

    The problem is that the garbage at the end is causing google to mark a ton of duplicate pages and is hurting our SEO. I don't even know what to refer to when searching for a fix.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    194
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    What's passing the garbage though?

    In your first example, you've typed that in manually to test and get the desired response. But why would urls be showing up in google with a valid file name (in your second example) ex: list.php and tack on the garbage? Where is the garbage coming from?

    I'm not so sure this is a cPanel issue, you might check your htaccess rules for something changing the URLs.
     
  3. MattAtNatwell

    MattAtNatwell Member

    Joined:
    Jul 3, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I was quick to label it as an argument, I can't say with any certainty that the garbage is being passed to anything. I would assume that placing a slash and any random text at the end of a URL would return a 404 error, but it's not, and that's what's messing with our SEO. If it is indeed an htaccess issue, what setting in EasyApache should I consider when rebuilding to correct this?
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    194
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I don't think you'd have to go that far for this.

    If you wish, please open the .htaccess file on your account in the root of that website (public_html/), a hidden dot file, and copy paste it here in code tags to peek at. (edit your domain names of course for privacy)

    It may be messing with SEO, but the real question still is, how did it get there to begin with?


    somesite.com/list.php/jhlwtkjerhtlwekrj

    That forward slash and garbage after it, is being added by something. On that account, in that website, if I was to guess. Has nothing to do with rebuilding apache to change something.

    HTH!
     
  5. MattAtNatwell

    MattAtNatwell Member

    Joined:
    Jul 3, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I wish I knew where Google was getting the garbage from. I've been all over my site and have yet to find one improperly written anchor.

    At any rate, here's the .htaccess:

    Code:
    RewriteEngine on
    # -FrontPage-
    
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName domainameremoved.com
    AuthUserFile /home/[username]/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/[username]/public_html/_vti_pvt/service.grp
    RewriteCond %{HTTP_HOST} ^[domainname]\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.[domainname]\.com$
    RewriteRule ^/?$ "http\:\/\/www\.[parkeddomainname]\.com\/" [R=301,L]
    
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    194
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I've edited your post to remove the URL in one place. And then I googled it. Can you give me an example here or via private message if you prefer of what you're using on google to see this garbage?

    This is really outside the scope of these forums to be honest, but if I can see something easy enough to help you out, I would.
     
Loading...

Share This Page