Forum Moderators: phranque

Message Too Old, No Replies

php Script Site Hijacking

Solution?

         

riospace

11:03 pm on Dec 5, 2006 (gmt 0)

10+ Year Member



I recently noticed that my site is being hijacked using a php script. The URL looks like:

[hijacker.com...]

In looking for a solution in I came across the following .htaccess code and wanted to know if this would be a good idea or even if it will work. All you would need is the IP address of the offender. Here is the code:

RewriteEngine on
RewriteCond %{REMOTE_ADDR} ^111\.111\.111\.111$
RewriteCond %{REQUEST_URI}!^/redirect\.php$ [NC]
RewriteRule ^(.*) /redirect.php [R]

That will send requests from their IP to your redirect.php file that contains:

<?php
header("Location: [where*you*send*them.com...]
exit;
?>

Good idea?

eelixduppy

11:54 pm on Dec 5, 2006 (gmt 0)



I think it would be a much better idea to discover how they are exploiting your php script and to fix it.

It doesn't make any sense to just handle it for him/her.