Apache rewrite rules
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [L]
11332 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 %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [L]
<file name="links.txt" location="/var/www/localhost/"> scotsman /gwd/feed/scotsman.html digg /gwd/feed/digg.html </file> <IfModule mod_rewrite.c> RewriteEngine on RewriteMap links txt:/var/www/localhost/links.txt RewriteRule ^/l/(.*) ${links:$1|http://mysite.com/} [R] </IfModule>
<IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^/shortcut$ /complicated/and/way/too/long/url/here </IfModule>
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]
<Directory /path/to/trac.domain.com/htdocs/trac/> AllowOverride None Options ExecCGI AddHandler cgi-script .cgi Order allow,deny Allow from all </Directory> <VirtualHost 1.2.3.4> ServerName trac.domain.com DocumentRoot /path/to/trac.domain.com/htdocs/ RewriteEngine On RewriteCond %{REQUEST_URI} !^/cgi-bin/ RewriteCond %{REQUEST_URI} !^/trac/ RewriteRule ^/(.*) /trac/trac.cgi/$1 [L] <Location /> SetEnv TRAC_ENV "/var/lib/trac/projname"> </Location> </VirtualHost>
RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://www.domain.de/folder/$1 [L,R]
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !snippets\.html RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] RewriteRule snippets\.html /snippets/ [R]
RewriteEngine On RewriteCond %{HTTP_X_MOZ} ^prefetch$ RewriteRule ^.*$ - [F]
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]