Some major .htaccess help

Discussion in 'Apache' started by seocompany, May 14, 2010.

  1. #1
    Hello,

    This website I am working on had a messed up .htaccess about two months ago, which is supposed to be fixed, but the googlebot keeps on finding lots of 404s, there is over 40,000 of them in webmaster tools. These pages are not in the google index, or sitemap, nor any links from any other pages, as far as we can tell. It seems to be some error in the .htaccess file.
    google is not crawling pages anymore like it used to, pages are being dropped out of google index, traffic has gone down. So I would really like to get it fixed as soon as possible.

    This is part of the file:

    #Options +FollowSymLinks
    
    php_value error_reporting 1
    
    <IfModule mod_rewrite.c>
    	RewriteEngine On
    	
    	RewriteCond %{HTTPS} !on
    	RewriteCond %{HTTP_HOST} ^website.com [NC] 
    	RewriteRule ^(.*)$ http://www.website.com/$1 [L,R=301] 
    	
    	RewriteCond %{HTTPS} on
    	RewriteCond %{HTTP_HOST} ^website.com [NC] 
    	RewriteRule ^(.*)$ https://www.website.com/$1 [L,R=301] 
    	
    	RewriteRule ^(.*)\/function\.mkdir$ /$1 [L,R=301]
    	
    	RewriteRule ^google2a182b0273bc.html$ - [L]
    	RewriteRule ^google493735a2a7cd7.html$ - [L]
    	
    	RewriteRule (.*)\.html$ $1.php [L]
    	RewriteRule (.*)sitemap\.xml$ sitemap_area.php [L]
    	
    	RewriteRule api - [L]
    	
    	RewriteRule ^(.*)\/$ /$1 [R=301,L]
    	
    	RewriteCond %{REQUEST_FILENAME} !-f
    	RewriteCond %{REQUEST_FILENAME} !-d
    	RewriteRule . frontend/index.php [L]
    	
    	RewriteCond %{REQUEST_URI} !^/robots.txt
    	RewriteRule ^[A-Z]{2}-.* /php/profile.php [L]
    </IfModule> 
    
    #RedirectMatch 301 ^/(.*)\/$ /$1
    Code (markup):
    If you can help me, please let me know.
     
    seocompany, May 14, 2010 IP
  2. RAmoss

    RAmoss Guest

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What web application are you running? What URLs are being 404'd?
     
    RAmoss, May 17, 2010 IP
  3. seocompany

    seocompany Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It was a custom cms. There was all kinds of urls being 404ed.

    It was way over my head, so I got some outside help.

    Thanks anyways.
     
    seocompany, Aug 12, 2010 IP