Forum Moderators: phranque

Message Too Old, No Replies

cleaning up 404 error log with .htaccess

trying to keep out certain files

         

janbeeu

12:47 am on Feb 7, 2007 (gmt 0)

10+ Year Member



I'm trying to keep certain files like:

/_vti_bin/owssvr.dll
/MSOffice/cltreq.asp
/phpbb/index.php

(and more) from getting into my 404 error log so I have a better view on real errors. I would like to redirect them to www.mysite.com

Second question. Wich code do I use to do the same with requests that contain certain words. For instance anything containing /images/excursions/

Thanks in advance for your help

janbeeu

11:16 am on Feb 8, 2007 (gmt 0)

10+ Year Member



Anyone?

jdMorgan

2:52 pm on Feb 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's a simple matter to redirect a few pages, and while we'd be happy to help you get *your* code working, we can't provide coding services here. More importantly, it's a fairly bad idea to redirect these URLs because the contents of those files, if they exist, have meaning to the FrontPage collaboration process.

I suggest using a 403 Forbidden or a 410-Gone response if you feel that it is worth the risk. Perhaps a better approach would be to study the FrontPage Extensions documentation and return the file contents expected for the case where no files on your site are sharable/editable, but I've never bothered to do this.

For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim