htaccess for subdirectories, add rewritebase

This should fix the issue(#94) with htaccess and subdirectories.