index | misc

How is blacking out for the #SOPASTRIKE.


One of the easiest ways to go on Strike against SOPA, if your site uses only one application or theme, is to use code from or


If your site is a wordpress site, you can use this plugin:

More Complex Sites (how I'm doing it)

However, if your site, like mine, uses various applications (statusnet, dokuwiki, wordpress, gallery), and, thus, multiple theme files, etc., grabbing multiple plugins, or copying code to themes for multiple applications, etc., isn't going to be efficient.

This is a relatively simple means of accomplishing the feat (note: you will need root access to your server to restart apache, so this won't work on most shared hosts).

First, I copied my current .htaccess to a back-up file, then replaced it with a file with the following code:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_ADDR} !^00\.00\.00\.00
RewriteCond %{REQUEST_URI} !^/503.php [NC]
RewriteRule .* /503.php [R,L]

Then, I made this 503.php page (same as except for header alteration), which is just a php page with the following in the header:

header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Retry-After: Thu, 19 Jan 2012 00:00:00 GMT');

Then, of course, I had to restart apache.

  sudo /etc/init.d/apache2 restart

If you'd like the full code to my 503.php/StopSopa page (feel free to copy the page to your server):

<!DOCTYPE html>
<title>STOP SOPA & PIPA</title>
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Retry-After: Thu, 19 Jan 2012 00:00:00 GMT');
<style type="text/css">
	body { color: #ffffff; background-color: #000000; text-align: center; width: 800px; margin: auto; }
	a:link {text-decoration: underline; color: #99b3f8;} /* #e1ffff;} */
	a:visited {text-decoration: none; color: #e1ffff;}
	a:active {text-decoration: none; color: #ffffff;}
	a:hover {text-decoration: none; color: #303e74; background-color: white;}
	#linx { margin: 0 auto; text-align: left; padding: 15px;}
	<br />
	<h1>STOP SOPA & PIPA</h1>
	<p>Protect your rights to freedom of information and expression.<br/>Protect the internet from corporate control.</p>
	<p><small>this site will resume normal activity on 2012.01.19</small></p>
	<iframe src=";portrait=0" width="601" height="338" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
	<div id="linx">
	<h4>Take Action:</h4>
		<li>See this infographic and learn: <a href="">What is SOPA, and how does it work?</a></li>
		<li><a href="">Learn more about what SOPA is, and what it means for business and innovation</a></li>
		<li><a href="">Sign up at to send a note to Congress and get updates</a></li>
		<li><a href="https://wwws/">Sign the Stop the E-PARASITE Act petition</a></li>
		<li><a href="">Sign the Avaaz petition</a></li>
		<li><a href="">Visit this Tumblr page and call your congressperson</a></li>
		<li><a href="">Follow the Electronic Fronteir Foundation (EFF) on Twitter</a></li>
		<li><a href="">Sign up to have Senator Ron Wyden read your name on the Senate floor when he filibusters SOPA</a></li>
		<li><a href="">12 actions you can take right now</a></li>
		<li><a href="">Write Congress to STOP PIPA</a></li>
		<li>Read: <a href="">What is SOPA, and why should YOU care?</a></li>
		<li>WEBMASTERS: <a href="">Redirect your site to #SOPASTRIKE</a></li>
		<li>WEBMASTERS: <a href="">How to black out for #SOPASTRIKE</a></li>
		<li>Share this page:<br /><a href=""></a> or <a href=""></a></li>
<p>this site will resume normal activity on 2012.01.19</p>
	<br />
		<a rel="license" href=""><img alt="Creative Commons License" style="border-width:0" src="" /></a><br /><span xmlns:dct="" href="" property="dct:title" rel="dct:type">STOP SOPA</span> by <a xmlns:cc="" href="" property="cc:attributionName" rel="cc:attributionURL">tony baldwin</a> is licensed under a <a rel="license" href="">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.<br />Based on a work at <a xmlns:dct="" href="" rel="dct:source"></a>.

End Strike

To go off strike on Thursday, I will simply replace my usual .htaccess and restart apache again.

tonybaldwin 2012.

short link to this page: