Reputation: 179
I need to configure the .HTACCESS file so that every time someone accesses any file or directory of the site, a php script is executed and this script is informed of the requested file (sent to the browser). What is the simplest way to accomplish this? I need to create an access statistics table, using data from the IP that it accesses. On the sites I created, I simply put on each page a call to the database record. But on this occasion, I'm dealing with a Word Press site. That's a lot of files, and I would not dare change them. Therefore I intend to use this method: Have HTACCESS collect the request data and run the php script that will register the DB.
Upvotes: 1
Views: 358
Reputation: 301
Add this to your .htaccess file, replacing /path_to_file/file.php
with your file's path
php_value auto_prepend_file "/path_to_file/file.php"
Upvotes: 2