Forum

DenyAccess Error

Heiko
2 October 2014, 13:55
Hello Hugo,

Header User-Agent "AppEngine-Google; (+http://code.google.com/appengine; appid: s~page-d)" DenyAccess


brings:
hiawatha -k                         
Using /usr/local/etc/hiawatha
Reading hiawatha.conf
Syntax error in hiawatha.conf on line 325.


I dont see the error in this line, could you give me a tip?
Thank you.

Heiko

Hiawatha version: 9.8
Operating System: OpenBSD 5.6 current
Hugo Leisink
2 October 2014, 14:03
The User-Agent value should be a valid regular expression pattern. Try this one:
Header User-Agent "AppEngine-Google; \(\+http:\/\/code.google.com\/appengine; appid: s~page-d\)" DenyAccess
Heiko
2 October 2014, 18:46
Thanks, this is working.

I'm wondering, because this is working too:

 Header User-Agent "Mozilla/5.0 (compatible; BLEXBot/1.0; +http://webmeup-crawler.com/)" DenyAccess


But I think I have to escape the +

Thanks
Heiko
2 October 2014, 19:10
I changed all entries. Thanks.
Hugo Leisink
2 October 2014, 19:14
It's working because " +" is seen as one or more spaces. Use " \+" to make Hiawatha see it as a space and a plus character.
Heiko
2 October 2014, 22:42
Ok, without \ the search result would be wrong.
Thanks Hugo
This topic has been closed.