Forum Moderators: phranque

Message Too Old, No Replies

Coding to block all domain traffic - revisited

         

Numero_Uno

7:19 pm on Jun 29, 2006 (gmt 0)

10+ Year Member



My web host sent me to this thread -- [webmasterworld.com...] --because I wanted to know how I could block all incoming traffic from www.ezboard.com. I used the coding in the above thread but I get an Internal Error 500 message on my site.

I used this line of code in my .htaccess file:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^(www\.)?ezboard\.com
RewriteRule .* - [F]

Can you tell me what I'm doing wrong? I've tried derivates of the above and am still getting the error.

Also, does it matter where in the .htaccess file it goes?

Thanks for your help - I'm a complete novice (as you can surely tell).

jdMorgan

7:31 pm on Jun 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The code would go in a plain-text file named ".htaccess" in the top-level Web-accessible directory of your site -- the same directory where your 'home page' and robots.txt file are located.

If you are getting a 500-Server Error, examine your server error log file -- It will often tell you exactly what is wrong. (This file should be available via FTP, a shell login, or through your 'control panel'.)

Since there is nothing visibily wrong with your code, I would guess that the problem is one of the following -- but do check your server error log first:

1) Mod_rewrite is not supported on your server -- talk to your host again, or cosider using Apache mod_access instead.
-or-
2) The "Options" directive, while required on many servers, is not allowed on others. It might work if you removed that line -- Again, ask your host.

Jim

Numero_Uno

8:22 pm on Jun 29, 2006 (gmt 0)

10+ Year Member



Removing the Options directive and placing the code at the extreme top of the .htaccess file seems to have worked. I'm not getting an error anymore anyhow.

I knew the fix would be simple. Thanks so much! I appreciate your help.