@zion
To use .htaccess to log IP addresses, you can follow these steps:
1 2 3 4 |
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=REMOTE_ADDR:%{REMOTE_ADDR}]
</IfModule>
|
This code makes use of the mod_rewrite module to assign the value of the REMOTE_ADDR server variable to the REMOTE_ADDR environment variable.
With these configurations, every time a user accesses a file in the directory where the .htaccess file is located, the IP address of the user will be logged.
The logs can typically be found in the server logs. The exact location and format of the log files depend on the server configuration. You may need to consult with your hosting provider or server administrator to access and interpret the logs appropriately.