Forum Moderators: phranque

Message Too Old, No Replies

is this correct?

trying to mixup -order allow, deny- with -RewriteEngine On-

         

tito

10:04 pm on Aug 1, 2004 (gmt 0)

10+ Year Member



hello,

as 'Microsoft-WebDAV-MiniRedir' is heavily hitting my server i'm trying to add 'RewriteEngine On' to 'order allow, deny' on my htaccess,
please does it looks correct to you as it follows?

thanks so much

--------------------------

ErrorDocument 401 /401.php
ErrorDocument 403 /403.php
ErrorDocument 404 /404.php
ErrorDocument 500 /500.php
SetEnvIf Request_URI "(403\.php¦robots\.txt)$" allowit

Order Deny,Allow
deny from 80.****.****.xx
deny from 168.xxx.xxx.x
deny from 69.xx.xx.xxx
deny from 222.xxx
deny from 82.xxx.xxx.xx
deny from 82.xx.xx.xx
Allow from env=allowit

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^Microsoft.(Data¦URL) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^microsoft-webdav-miniredir [NC,OR]
RewriteCond %{HTTP_USER_AGENT} MS.*FrontPage [NC]
RewriteRule .* - [F]

jdMorgan

1:25 am on Aug 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



tito,

You might want to add your 403 page as an exclusion to the RewriteRule, for the same reason it's excluded from the denies:


RewriteRule !403\.php$ - [F]

(Prevents a request loop caused by access to your 403 page being denied)

Other than that it looks fine.

Jim

tito

9:40 pm on Aug 2, 2004 (gmt 0)

10+ Year Member



Thank you Jim, it works perfectly now.