Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Anti-worm/virus redirects in an .htaccess file - any good?

Discussion in 'General Discussion' started by spaceman, Dec 5, 2007.

  1. spaceman

    spaceman Well-Known Member

    Mar 25, 2002
    Likes Received:
    Trophy Points:
    I'm looking for opinions on whether the following advice is (still) good:

    I did a little research and testing, and added the following lines to my .htaccess file.

    redirect /scripts http://www.stoptheviruscold.invalid
    redirect /MSADC http://www.stoptheviruscold.invalid
    redirect /c http://www.stoptheviruscold.invalid
    redirect /d http://www.stoptheviruscold.invalid
    redirect /_mem_bin http://stoptheviruscold.invalid
    redirect /msadc http://stoptheviruscold.invalid
    RedirectMatch (.*)\cmd.exe$ http://stoptheviruscold.invalid$1

    These lines did exactly what I wanted them to do - they stopped the virus from creating 404 errors in my log file, and they prevented my 404 error page from being triggered, thus creating lots of useless bandwidth utilization. There is still some bandwidth used, obviously, but it is far less than it would have been. The load on the server is also considerably reduced, which should make my web hosting company happy.

    Note that log file entries are still made by the various worms as they attempt to penetrate the server. These entries do now show as errors, which makes it easier to pick out real errors from the logs.

    The full article is here:

    We've been adding this to our .htaccess files as standard for years (because it seemed to make sense at the time). But the weird thing is that we've just noticed in cPanel that these redirect lines erroneously show up in the 'Redirects To' column of the Parked Domains feature. We're going to post this to cPanel as a bug.

    Comments anyone?
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Nov 29, 2006
    Likes Received:
    Trophy Points:
    Houston, TX
    cPanel Access Level:
    Root Administrator

Share This Page