Forum Moderators: DixonJones

Message Too Old, No Replies

Microsoft-WebDAV & Microsoft Data Access

How to ban those?

         

silverbytes

3:28 pm on Nov 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I saw bad comments about Microsoft-WebDAV and wonder how to ban it from my site?

keyplyr

8:16 pm on Nov 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




RewriteCond %{HTTP_USER_AGENT} ^Microsoft.(Data¦URL) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Microsoft-WebDAV-MiniRedir [NC,OR]

Usually goges hand-in-hand with Frontpage, which is also used as a download tool, so I ban it as well:

RewriteCond %{HTTP_USER_AGENT} MS.*FrontPage [NC]
rewriterule !^robots\.txt$ - [F]

<added>
Don't forget to replace the broken pipe(¦) with the one from your keyboard.
</added>

nancyb

10:23 pm on Nov 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



keyplyr,

don't understand - rewriterule!^robots\.txt$ - [F]

what does this rewrite rule do?

can you explain this a little for dummies like me?

keyplyr

11:28 pm on Nov 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi nancyb,

It serves the user the robots.txt instead of whatever they are after. If cut 'n pasting, don't forget to add a space before the "!"

jdMorgan

11:35 pm on Nov 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



nancyb,

That line translates, "If the requested resource is NOT robots.txt, leave the URL alone, but return a 403-Forbidden server response."

If you use a custom 403 page, then it should also be excluded as with robots.txt:


RewriteRule !^(robots\.txt¦custom-403\.html)$ - [F]

As keyplyr noted, replace the broken vertical pipe "¦" character with a solid vertical pipe character from your keyboard.

Jim

nancyb

12:02 am on Nov 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



thanks Jim and keyplyr. I'm just on my way out so will make sure I understand this later. thanks for 'splain'n :)

keyplyr

12:17 am on Nov 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks Jim, I knew it was something like that.