Support

Admin Tools

#41995 Can't get Bad Words Filter to work

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
5.3.1
PHP version
8.2.28
Admin Tools version
7.8.0

Latest post by sandvalley2019 on Thursday, 12 June 2025 07:00 CDT

sandvalley2019

Hi there, 

I can not get Bad Words Filtering to work.

I have enabled "Bad Word filter" in "Web Application Firewall / Configure WAF / Request filtering", and I have added three words: "evenementenperdag", "evenementenperweek" and "evenementenperjaar"

But still the url https://leroytuin.nl/agenda/geweest/evenementenperweek/2022/6/6/14  is available, where I expected a 404 status. 

Kind regards, 
Peter

 

nicholas
Akeeba Staff
Manager

I understand what you are trying to do. You chose the wrong tool to do it.

The Anti-spam Bad Words feature will block a request if any request parameter contains a forbidden word. That part you understand. What you didn't fully understand is that what you see in the URL and what Joomla ends up with as the request parameter is not necessarily the same thing because Joomla parses SEF URLs into request parameters. Bad Words will act on the parsed request parameters, not the SEF URL path, which do not contain the word you are trying to block.

What you are trying to do is best handled with custom .htaccess code. Add the following to your .htaccess Maker "Custom .htaccess rules at the top of the file":

RewriteCond %{REQUEST_URI} /(evenementenperdag|evenementenperweek|evenementenperjaar)/ [NC]
RewriteRule ^ - [F,L]

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sandvalley2019

Thanks, I added the line as suggested, and when I check the .htacces file the lines are added at the end of the file, but still the url is accessible. 

Regards,
Peter

sandvalley2019

My mistake: I added the line "at the end of the htacces file". When placed on top, it works fine

Thanks,
Peter

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!