Forum Moderators: coopster & phranque

Message Too Old, No Replies

tweaking htaccess

referer with OR without www

         

rcjordan

10:31 pm on Nov 8, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Toolman's posts on htaccess [webmasterworld.com] has been a great help, btw. Thanks tool!

I want to feed a 403 to a certain sitesuckinscum. I'd like to shut him down with or without the "www" in the referer. This works, but lacks elegance. Can it be reduced to just two lines?

RewriteCond %{HTTP_REFERER} ^http://www.sitesuckinscum.org$
RewriteRule !^http://[^/.]\.mydomain.com.* - [F]
RewriteCond %{HTTP_REFERER} ^http://sitesuckinscum.org$
RewriteRule !^http://[^/.]\.mydomain.com.* - [F]

rcjordan

10:45 pm on Nov 8, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



using sugarkane's syntax suggested in the earlier thread, I tried

RewriteCond %{HTTP_REFERER} .*sitesuckinscum.org$
RewriteRule !^http://[^/.]\.mydomain.com.* - [F]

Seems to work.