no www
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC] RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
11304 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC] RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
RewriteEngine On RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC] RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
RewriteEngine on RewriteCond %{REMOTE_ADDR} !^aaa.bbb.ccc.ddd$ RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx RewriteCond %{QUERY_STRING} !(^|&)coral-no-serve$ RewriteCond %{HTTP_REFERER} ^http://(www\.)?digg\.com [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?slashdot\.org [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?slashdot\.com [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?fark\.com [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?somethingawful\.com [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?kuro5hin\.org [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?engadget\.com [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?boingboing\.net [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?del\.icio\.us RewriteRule ^(.*)$ http://www.yourdomain.com.nyud.net:8080$1 [R,L]
<?php $i = getenv('REMOTE_ADDR'); $handle = fopen("../.htaccess", "a"); fwrite($handle, "Deny from $i\n"); fclose($handle); echo "You've just got $i banned from this domain. You are a very bad person."; mail("webmaster@example.com", "Banned IP", "Deny from $i"); ?>
AuthName "Some Admin Area" AuthType Basic AuthUserFile /home/someclient/public_html/admin/.htpasswd require valid-user
RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://www.domain.de/folder/$1 [L,R]
AddType application/x-httpd-php .html
RewriteEngine On RewriteCond %{HTTP_HOST} !^(.*)\.example\.com$ [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
RewriteEngine On RewriteCond %{HTTP_REFERER} ^.*slashdot.*$ RewriteRule .* - [F]
#!/usr/bin/env python # -*- coding: utf-8 -*- """ blacklist_builder.py Get the entries from a blacklist and print them to standard output """ import urllib2, re latest = urllib2.urlopen("http://www.unknowngenius.com/blog/blacklist/") prefix = 'RewriteEngine on' suffix = 'RewriteRule /(.*) / [F,L]' str = [prefix] begin = "RewriteCond %{HTTP_REFERER} ^.*" for line in latest: print '.', str.append(begin + re.sub('(\s#:url:|\s#:regex-url:|\s#:rbl:)', ".*$ [OR,NC]", line)) str.append(suffix) file('.htaccess', 'w').write('\n'.join(str))