• 0

Apache Config for Anti-SOPA Blackout


Question

For anyone that might be helped by this, I've googled it and tried to make it as drop-dead easy as it can be.

Good for Apache Servers (likely 1.3 and higher)

1. Create a page "antisopa.html" and place it in the root of your web directory (eg, /var/www/html/antisopa.html)

2. Insert the following at the end of your httpd.conf


RewriteEngine On
#RewriteCond %{REQUEST_URI} !^/omit.*
RewriteRule /.* http://www.yourdomain.com/antisopa.html
[/CODE]

3. Save your config and restart your apache server service and test.

On the second line (RewriteCond...), you can add directories to omit or select directories to only redirect for. Currently it's set to not redirect any request to the "omit" directory. Uncomment and change it if you need.

For today:

Recomment the last 3 lines, save the config file and restart your apache service and your site will be back to normal.

Then, uncomment the relevant lines and save the config. All you'll need to do on the 17th is restart apache for it to take effect.

Open to any suggestions on how to improve this.

Edit: I have uploaded a"antisopa.html" document that I'm using, just incase it's helpful for anyone else. It's XHTML 1.0 Strict compliant.

antisopa.zip

Edited by cybertimber2008
  • Like 1
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

I'd need one for IIS :p

Simple, create an empty folder, make your html, and change the IIS bindnig to point to the folder :)

Link to comment
Share on other sites

  • 0

Why do you need an anti SOPA page? It was overruled today?

And this was posted before it was shelved. Shelved != overruled by the way.

And there is still PIPA which is just as bad as SOPA.

Link to comment
Share on other sites

  • 0

And this was posted before it was shelved. Shelved != overruled by the way.

And there is still PIPA which is just as bad as SOPA.

Ahh okay, fair enough!

I got told they were both overruled, I think I'll read up on them now :p

Useful code by the way, I'm using it to redirect my main website to my business page :)

Link to comment
Share on other sites

This topic is now closed to further replies.