Forum Moderators: coopster
the trap works if it is in the root, but I can't work out how to adjust the path statement to call the script in the root, from a bottrap in a different directory. As I have some bots who go direct to certain locations rather than "crawling" the site, I can only trap them by putting renamed trap files in that location.
The path of the root directory for my pages in the site is given in the logs as
/var/www/vhosts/mydomain/httpdocs/
and .htaccess and the script (bottrap-script.php) are in that httpdocs directory.
The bot trap is here
/var/www/vhosts/mydomain/httpdocs/WebCalendar/ws/bottrap.php (renamed as appropriate)
The statement in the bot trap I need to rewrite (if it is possible to include the php equivalent of a path) is
<?php
include 'bottrap-script.php';
?>
I am brand new to php scripts and bot traps and ftp server work, having had my site hacked and my domain host server crashed a fortnight ago by a vulnerability in an older version of WebCalendar - which the bots are still visiting and looking for- hence the strategy. I have a newer version of the app. in a different location.
Many thanks in advance for any help.
So long as you have permission to access that path then you can include it. If you dont have permission then I think that you get a warning, something along the lines of 'safe mode restriction in place', you will also get the warning that the include statement failed.