Jump to content

Question

Posted (edited)

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
[CODE]
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. Edited by cybertimber2008
1 person likes this

Share this post


Link to post
Share on other sites

8 answers to this question

  • 0

Posted

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

Share this post


Link to post
Share on other sites
  • 0

Posted

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

Share this post


Link to post
Share on other sites
  • 0

Posted

I'd need one for IIS :p

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='Raa' timestamp='1326664460' post='594585771']
I'd need one for IIS :p
[/quote]

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
  • 0

Posted

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

Share this post


Link to post
Share on other sites
  • 0

Posted

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
  • 0

Posted

[quote name='MattehCarter' timestamp='1326737735' post='594587531']
Why do you need an anti SOPA page? It was overruled today?
[/quote]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
  • 0

Posted

[quote name='cybertimber2008' timestamp='1326739825' post='594587611']
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.
[/quote]

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  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.