Forum Moderators: phranque

Message Too Old, No Replies

Does this look okay?

My first .htaccess

         

walrus

5:16 pm on Jul 11, 2004 (gmt 0)

10+ Year Member



Does this look right?
Some of it i got here so im sure its good.
Is there supposed to be an open file and end file befor the "order allow,deny".Does the sequence matter?

I,m thinking of uploading it and my host offers no help with .htaccess, they just say go ahead and do it.

<Files .htaccess>
order allow,deny
deny from all
</Files>

order allow,deny
deny from 123.45.6.7
deny from 012.34.5.
deny from 192.168.128.14
deny from 192.168.128.
deny from whoeverichoose.com
allow from all

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mozilla.*NEWT [OR]
RewriteCond %{HTTP_USER_AGENT} ^Crescent [OR]
RewriteCond %{HTTP_USER_AGENT} ^CherryPicker [OR]
RewriteCond %{HTTP_USER_AGENT} ^[Ww]eb[Bb]andit [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebEMailExtrac.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^NICErsPRO [OR]
RewriteCond %{HTTP_USER_AGENT} ^Teleport [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus.*Webster [OR]
RewriteCond %{HTTP_USER_AGENT} ^Microsoft.URL [OR]
RewriteCond %{HTTP_USER_AGENT} ^Wget [OR]
RewriteCond %{HTTP_USER_AGENT} ^LinkWalker [OR]
RewriteCond %{HTTP_USER_AGENT} ^sitecheck.internetseer.com [OR]
RewriteCond %{HTTP_USER_AGENT} ^ia_archiver [OR]
RewriteCond %{HTTP_USER_AGENT} ^DIIbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^psbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailCollector
RewriteRule ^.* - [F]
RewriteCond %{HTTP_REFERER} ^http://www.iaea.org$
RewriteRule!^http://[^/.]\.widgetsfromouterspace.com.* - [F]

Thanks in advance
Walrus

jdMorgan

2:45 pm on Jul 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Walrus,

> Is there supposed to be an open file and end file befor the "order allow,deny".Does the sequence matter?

You should probably use <Files *> and </Files> as a container for your mod_access directives. The order of allow,deny or deny,allow in the order directive is critical, but the order of the individual allow and deny directives that follow the order directive is not critical. See the Apache mod_access documentation [httpd.apache.org] for more information.

At a glance, your code looks basically sound.

Jim

walrus

8:47 pm on Jul 24, 2004 (gmt 0)

10+ Year Member



Thanks a lot Jim ,really appreciate it!
Im having trouble getting rewrite cond or engine commands to work,so far every time i try to include those sets my whole site gets blocked.
Gonna try again,I'll take your advice and study up on apache.org.

Thanks again!
Walrus

jdMorgan

9:05 pm on Jul 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> so far every time i try to include those sets my whole site gets blocked

What does your error log show when this happens?

You may need to add Options +FollowSymLinks ahead of RewriteEngine on if it's not already configured in httpd.conf.

Jim

walrus

8:44 pm on Jul 25, 2004 (gmt 0)

10+ Year Member



Thanks again Jim!
I'll try that.
Walrus