htaccess
#1
Posted 05 May 2007 - 07:47 AM
RewriteEngine on
example:
1st instruction
# RewriteEngine on
# RewriteCond %{HTTP_REFERER} !^$
# Blah
# blah
# blah
# RewriteRule .*.(gif|GIF|jpg|JPG|bmp|BMP|wav|mp3|wmv|avi|mpeg)$ - [F]
2nd instruction:
# RewriteEngine on
# RewriteCond %{HTTP_REFERER} nasty.com [NC,OR]
# Blah
# blah
# RewriteRule .* - [F]
3rd instruction:
# RewriteEngine On
# RewriteCond %{HTTP_USER_AGENT} ^BadBot [OR]
# RewriteCond %{HTTP_USER_AGENT} ^AnotherBadBot [OR]
# Blah
# blah
# RewriteRule ^.* - [F,L]
Do I leave off the second and third Rewrite Engine On part
or Does htaccess need each rewrite on to initiate the separate commands?
or
Leave it on each , it wont affect how htaccess is handled?
#2
Posted 05 May 2007 - 07:48 AM
Please try out our new Creativity Forums! Log in with your Science Forums credentials.
Science is not only compatible with spirituality; it is a profound source of spirituality.
- Carl Sagan
#3
Posted 05 May 2007 - 07:49 AM
Tormod said:
Wow, that was fast!
Thank you!
#4
Posted 05 May 2007 - 07:52 AM
There are tons of good tutorials out there. I've struggled enough with rewriteengine to know that it can be daunting to get it to do what you want sometimes.
Here's one:
Module Rewrite - URL Rewriting guide.
For more, simply google "rewriteengine tutorial".
Please try out our new Creativity Forums! Log in with your Science Forums credentials.
Science is not only compatible with spirituality; it is a profound source of spirituality.
- Carl Sagan
#5
Posted 08 May 2007 - 07:23 AM
I managed to block everyone from the website (not sure if it was wildcards or escape) Fixed now.
Screwed up the No-Hot-Linking (fixed now)
Managed to block image linking within the website (fixed now).
Thought my head was gonna explode for a while there, but I am better now.
#6
Posted 16 November 2007 - 08:31 AM
RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?airline333tickets.com.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?airline379tickets.com.*$ [NC,OR]
as you can see, what he is doing is changing from airlinetickets.com to airline333tickets.com, to airline279.com, etc. He is doing with with others also.
Is is something like http(s)?://(www.)?airline{*}tickets.com?
Thanks !
#7
Posted 16 November 2007 - 09:56 AM
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://(www.)?.*(-|.)?airline(-|.).*$ [OR]
RewriteRule .* - [F]
Not tested, just guessing, really.
Please try out our new Creativity Forums! Log in with your Science Forums credentials.
Science is not only compatible with spirituality; it is a profound source of spirituality.
- Carl Sagan
#8
Posted 16 November 2007 - 12:09 PM
Caution: some thinking required when using this product, keep your axons and dendrites inside your head at all times.
#9
Posted 21 November 2007 - 04:01 AM
Tormod said:
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://(www.)?.*(-|.)?airline(-|.).*$ [OR]
RewriteRule .* - [F]
Not tested, just guessing, really.
The * in the referer name gave me a 500 internal error.
the adjustments I tried did not block *airline. I didnt try every combo possible, may work on that later this week. But its been over 2 full days now and the spammer has been getting 403'd when he tries to get in after I added a few name combos proactively.
htaccess is pretty cool!
#10
Posted 25 November 2007 - 11:36 PM
Please try out our new Creativity Forums! Log in with your Science Forums credentials.
Science is not only compatible with spirituality; it is a profound source of spirituality.
- Carl Sagan

Help
Join now


Promote to Article











