antilogic.co.uk

Hi! I'm Schakil and this is my home on web.Logics will get you from A to B, Imagination will take you everywhere ~ Albert Einstein

.htaccess hack

Have a loot at this:


RewriteEngine On
RewriteCond %{HTTP_REFERER} .*google.* [OR]
RewriteCond %{HTTP_REFERER} .*yahoo.* [OR]
RewriteCond %{HTTP_REFERER} .*msn.* [OR]
RewriteCond %{HTTP_REFERER} .*ask.*
RewriteRule ^(.*)$ http://www.someotherwebsite.com/ [L]

Basically, this code is redirecting all traffic coming from the above search engines to http://www.someotherwebsite.com/.

I am sure this does not require any further explanation.

Piece of advice: If your website is hosted on an Apache web server, always check the .htaccess file in the root directory for foreign code.

No Comments

Reply to “.htaccess hack”