Hello everybody,
I try to get work some rules to block spam url as found with a little googling (here for example: http://diveintomark.org/archives/2003/0 ... mbots_ban_ ... go_to_hell)
RewriteCond %{HTTP_REFERER} badurl.fr [NC]
RewriteRule .* / - [F]
For my case, I would like to send a 404 code (for search engine) rather than a 403, and redirect the 404 code on my home page (to not disturb the users).
ErrorDocument 404 /
RewriteCond %{HTTP_REFERER} badurl.fr [NC]
RewriteRule .* /fake.html [L]
The last line doesn't work. if the referer's condition is false it's ok, but if referer contains badurl.fr I have an error 500 Internal Server Error.
RewriteRule .* /fake.html [L,R=404]
Is not correct because R is in 300-400 range, and I didn't find any equivalent flag as F for 404
All suggestions will be appreciate
Thanks
N.B: fake.html doesn't exist