Hi!
I've been testing Hiawatha and everything is working just fine, virtual hosts etc. Even installed banshee for testing. But... I'm trying to get zencart and zenmagick ecommerce packages working with hiawatha and got problems with .htaccess files. Typical zencart file is like this:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# deny *everything*
<FilesMatch ".*">
Order Allow,Deny
Deny from all
</FilesMatch>
# but now allow just *certain* necessary files:
<FilesMatch ".*\.(js|JS|css|CSS|jpg|JPG|gif|GIF|png|PNG|swf|SWF|xsl|XSL)$">
Order Allow,Deny
Allow from all
</FilesMatch>
IndexIgnore */*
## NOTE: If you want even greater security to prevent hackers from running scripts in this folder, uncomment the following line (if your hosting company will allow you to use OPTIONS):
# OPTIONS -Indexes -ExecCGI
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I've tried to use look-arounds like this.
Match ^/includes/.+\.^(?!.*\b(js|JS|css|CSS|jpg|JPG|gif|GIF|png|PNG|swf|SWF|xsl|XSL)\b).*$ DenyAccess
My idea is that if file does not end with listed ending -> Access is denied. Problem is that I can not test rules, because Hiawatha gives error when hiawatha.conf is reloaded. Is there support for regex lookarounds or am I missing something? It's been a while since I've done anything with regexes so its propably me missing something important
I've been reading manuals and how-to's so much now, that little advice would be nice.
Hiawatha version: 7.5
Operating System: Ubuntu 10.04