Archive for the ‘Apache’ Category

Eliminate stupid FrontPage requests from your error logs

Saturday, May 19th, 2007

Are you fed up seeing 404 errors like this in your server logs?

... "GET /_vti_inf.html HTTP/1.1" 404 963 "-" "Mozilla/4.0
     (compatible; MS FrontPage 6.0)"
... "POST /_vti_bin/shtml.exe/_vti_rpc HTTP/1.1" 404 963 "-"
     "MSFrontPage/6.0"

These non-existent files (_vti_inf.html, _vti_bin/shtml.exe, etc.) are found on sites created with Microsoft FrontPage and hosted on IIS servers. When a user requests these files, it usually means they’re trying to hack into your website by exploiting the numerous security flaws in FrontPage.

Since these files don’t exist on non-FrontPage websites, a “404 Not Found” error is generated every time a FrontPage file is requested. Not only does this clog up your error logs, but it also eats into your bandwidth allowance (especially if you use customized error pages).

To avoid this problem, I’ve started redirecting all these requests back to Microsoft’s own website. This is quite simple to do on an Apache server. Just insert the following into your .htaccess file:

<IfModule mod_alias.c>
RedirectMatch 301 (/_vti_bin.*$) http://www.microsoft.com$1
RedirectMatch 301 (/_vti_inf.*$) http://www.microsoft.com$1
RedirectMatch 301 (/MSOffice.*$) http://www.microsoft.com$1
</IfModule>

The next time someone requests /_vti_inf.html from your website, they wil be automaticaly redirected to microsoft.com. You can try it out here if you like. Just click on the following link and see where you end up:

http://midori.co.uk/_vti_inf.html

Yes, that’s more like it :-D