# since index.pl exists DirectoryIndex index.html # DAV, override Limits Order Allow,Deny Allow from all # using wget to get everything including actions, old stuff, etc. Deny from 184.82.236.206 # Cleared entire Deny list March 2012 # Deny from 223.65.90.20 # note that specific bots are listed below in the rewrite area! # Fast CGI # AddHandler fastcgi-script fcg fcgi fpl # about 0.5MB should be enough for requests (file uploads) # LimitRequestBody 500000 # one hour should be enough (CPU time) # RLimitCPU 2 4 # Resulted in tons of "Must be uid 0 to raise maximum RLimitCPU" # errors # about 50MB should be enough (reading log files and all that) # RLimitMEM 50000000 # Disable all scripts by redirecting them to a message! # RedirectMatch ^/cgi-bin/(alex|hug|ana|helmut|astrid|claudia|emacs|move|oddmuse|test|utis|paper|reflections|wiki) http://www.emacswiki.org/msg.html # Trying to solve this problem: Request exceeded the limit of 10 # internal redirects due to probable configuration error. Use # 'LimitInternalRecursion' to increase the limit if necessary. Use # 'LogLevel debug' to get a backtrace. # RewriteCond %{ENV:REDIRECT_STATUS} 200 # RewriteRule .* - [L] # get rid of .pl extensions RedirectMatch permanent /cgi-bin/([a-z-]*)\.pl(.*) http://www.emacswiki.org/cgi-bin/$1$2 Redirect permanent /cgi-bin/archive http://www.emacswiki.org/cgi-bin/emacs-archive Redirect permanent /cgi-bin/alex http://alexschroeder.ch/wiki RedirectMatch permanent ^/cgi-bin/oddmuse([^.]*).* http://www.oddmuse.org/cgi-bin/oddmuse$1 RedirectMatch permanent ^/cgi-bin/claudia([^.]*).* http://www.orientalisch.info/cgi-bin/wiki$1 RedirectMatch permanent ^/cgi-bin/(community|cw)(.*) http://www.communitywiki.org/cw$2 RedirectMatch permanent ^/cgi-bin/(svg-map|uwp-generator|m20-hard-core-characters)(.*) http://alexschroeder.ch/$1$2 # RedirectMatch permanent ^/cgi-bin/steffi.* http://www.emacswiki.org/cgi-bin/alex?Steffi RewriteEngine on # prefer www.emacswiki.org RewriteCond %{HTTP_HOST} ^emacswiki\.org [NC] RewriteRule ^(.*)$ http://www.emacswiki.org/$1 [R=301,L,NE] # I would use QSD for all of the following redirects, but that # requires Apache 2.4 and we currently use Apache 2.2.16. # Use 303 See Other for temporary redirects #bootstrap%251e0%251eusername%251eAlexSchroeder RewriteCond %{HTTP_COOKIE} Wiki=\S*bootstrap%251e0 RewriteCond %{QUERY_STRING} ^action=elisp-area;context=0 RewriteRule ^emacs.* http://www.emacswiki.org/emacs/elisp-area-compact-no-bootstrap.html [R=303,L,NE] RewriteCond %{QUERY_STRING} ^action=elisp-area;context=0 RewriteRule ^emacs.* http://www.emacswiki.org/emacs/elisp-area-compact.html [R=303,L,NE] RewriteCond %{HTTP_COOKIE} Wiki=\S*bootstrap%251e0 RewriteCond %{QUERY_STRING} ^action=elisp-area RewriteRule ^emacs.* http://www.emacswiki.org/emacs/elisp-area-no-bootstrap.html [R=303,L,NE] RewriteCond %{QUERY_STRING} ^action=elisp-area RewriteRule ^emacs.* http://www.emacswiki.org/emacs/elisp-area.html [R=303,L,NE] RewriteCond %{QUERY_STRING} ^action=rss;full=1;diff=1$ [OR] RewriteCond %{QUERY_STRING} ^action=rss;days=7;all=0;showedit=0;full=1;diff=1$ RewriteRule ^(wiki|emacs).* http://www.emacswiki.org/emacs/full-diff.rss [R=301,L,NE] RewriteCond %{QUERY_STRING} ^action=rss;full=1$ [OR] RewriteCond %{QUERY_STRING} ^action=rss;days=7;all=0;showedit=0;full=1$ RewriteRule ^(wiki|emacs).* http://www.emacswiki.org/emacs/full.rss [R=301,L,NE] RewriteCond %{QUERY_STRING} ^action=rss;showedit=1$ RewriteRule ^(wiki|emacs).* http://www.emacswiki.org/emacs/minor-edits.rss [R=301,L,NE] RewriteCond %{QUERY_STRING} ^action=rss$ [OR] RewriteCond %{QUERY_STRING} ^action=rss;days=7;all=0;showedit=0$ RewriteRule ^(wiki|emacs).* http://www.emacswiki.org/emacs/index.rss [R=301,L,NE] # banned user agents (bots) RewriteCond %{HTTP_USER_AGENT} ^Yeti RewriteRule ./ /banned_user_agent.html [L] # favicon (I wonder who looks for it in the same directory?) RewriteRule favicon\.(ico|gif) /favicon.ico [L]