mrzippy
07-11-2003, 12:36 PM
We have a certain visitor to one of our customer's sites that is sucking up a LOT of bandwidth by continually downloading one page.
We would like to redirect the IP for the accessing company (it is always the same) to a certain web page.
Is this possible? What would be the .htaccess directive?
thanks.
mrzippy
07-11-2003, 12:45 PM
OK.. it seems that the accessing users's IP is occasionally changing.
Is it possible to do this same redirect based on incoming "agent"?
Here's a sample from the log file that shows the access:
204.83.191.2 - - [08/Jul/2003:00:48:56 -0700] "GET /transmission/flowdata/data1.xls HTTP/1.1" 200 261632 "-" "Microsoft URL Control - 6.00.8169"
Is it possible to redirect based on the "Microsoft URL Control - 6.00.8169" part?
JFH-Sheldon
07-13-2003, 01:32 AM
If you're using Apache you could try using the ReWrite. You'll need to have mod_rewrite installed on the server. It's pretty commonly, so you may have it installed. You can check you httpd.conf for the module.
Something along the lines of:
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^Microsoft URL Control - 6.00.8169*
RewriteRule ^/transmission/flowdata/data1.xls$ newfile.html [L]
(the new file should be in the same folder as the data1.xls file. Otherwise, you will want to write out the entire path (i.e. /path/to/newfile.html )
Check here for the exact syntax:
http://www.engelschall.com/pw/apache/rewriteguide/
I am not sure if this can be added to a .htaccess file. We always set up rewrite rules in the httpd.conf file.