This week, bots have been striking on my website and have been spaming a lot on the forum, my first move has been to set all the forums with a moderator but I still have a few validation to do whenever someone is sending a message to the forum. Tonight, I’ve decided to use the URL rewriting engine of Apache in order to modify the URL of my website, from now on, all the *php* (.php, .php3, .php4, .php5) extension will be sent to a dead-end, I’ve also modified SPIP to generate new URL, hopefully this will discourage bots from coming on my website and try to post messages on the forum !
RewriteEngine on
RewriteRule ^$ /index.php3 [L]
RewriteRule ^index\.(html|htm)$ /index.php3 [L]
RewriteRule ^article([0-9]*)\.(html|htm)$ /article.php3?id_article=$1 [L]
RewriteRule ^rubrique([0-9]*)\.(html|htm)$ /rubrique.php3?id_rubrique=$1 [L]
RewriteRule ^auteur([0-9]*)\.(html|htm)$ /auteur.php3?id_auteur=$1 [L]
RewriteRule ^forum([0-9]*)\.(html|htm)$ /forum.php3?id_article=$1 [L]
RewriteRule ^forum-(.*)$ /forum.php3?$1 [L]
RewriteRule ^.(php3|php|php4|php5)$ /noway [L]