Support » How-To and Troubleshooting » .htaccess CRASHING server – intensive CPU usage

.htaccess CRASHING server – intensive CPU usage

  • tedwinters


    Hi guys,
    I have mod-rewrite on, and my wordpress .htaccess is crashing the server..
    CPU loads of 12-14 when permalinks are on..
    as soon as I nuke the .htaccess, it all goes down..

    Now, my blog isn’t a heavy traffic site, but, it’s in the root directory, and some of the non-blog pages off of root receive pretty heavy traffic…
    because the .htaccess is in the root, all the pages read it, and it generates enormous server load…

    How can this be fixed, short of moving my blog into a subdirectory?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Are the non blog pages in sub directories? If so place a .htaccess within each of the directories with:

    RewriteEngine Off



    Humm, unfortunately, I have to use rewrite conditions to block referrers 🙁
    this what I already have in the .htaccess in sub directories:

    RewriteEngine On
    Options -Indexes

    RewriteCond %{HTTP_REFERER} .*fusker*.*$ [NC]
    RewriteCond %{HTTP_REFERER} .*usefulidiot*.*$ [NC]
    RewriteRule .*\.(gif|jpg|jpeg|bmp|png)$ – [F,NC]

    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?google.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?yahoo.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?msn.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?altavista.com/.*$ [NC]
    RewriteRule \.(gif|jpg|jpeg|bmp|avi|wmv)$ http://www.mydomain.com/ [R,L]

    order allow,deny
    deny from fusker.com
    allow from all

    order allow,deny
    deny from lewww.com
    allow from all

    I’m mainly interested in blocking everything from *fusker* and everything from *lewww*
    all else is allowable..

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘.htaccess CRASHING server – intensive CPU usage’ is closed to new replies.