Posted by KaiseRCrazY on 1st February 2010

Use .htaccess like a protector…

Protect your blog from script injections with .htaccess. With this file we can make a lot of things. Today we insert a protect code into this file. Make backup and see how to make it… Let’s Begin

Here is the code;

Simply paste this code into your .htaccess file. Make backup before change file.

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]

That’s All!

  • del.icio.us
  • Digg
  • Facebook
  • FriendFeed
  • Reddit
  • StumbleUpon
  • Technorati
  • PDF
  • Print

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

No comments yet!

Post your comments