Sign in to follow this  

Apache Config for Anti-SOPA Blackout

Recommended Posts

cybertimber2008    43

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

Share this post


Link to post
Share on other sites
c3ntury    133

Thanks for sharing this! Brilliant idea to allow anyone to do it!

Share this post


Link to post
Share on other sites
cybertimber2008    43

Also added a sample antisopa.html page for those who might need it.

Share this post


Link to post
Share on other sites
Raa    1,407

I'd need one for IIS :p

Share this post


Link to post
Share on other sites
Farchord    181

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 :)

Share this post


Link to post
Share on other sites
MattehCarter    6

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

Share this post


Link to post
Share on other sites
+SOOPRcow    132

It was put on hold. It, parts of it, or something very much like it will be back soon enough.

Share this post


Link to post
Share on other sites
cybertimber2008    43

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.

Share this post


Link to post
Share on other sites
MattehCarter    6

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 :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.