Ok I have another question and I'm a beginner at this.
I have this RewriteRule, it redirects the query correctly but doesn't allow me to use the other directories:
RewriteRule ^([0-9A-Za-z]+)/?$ /query.php?id=$1 [L]
and now this RewriteRule to skip all these directories but now the rule above needs to be commented out for this to work.
RewriteRule ^(css|js|admin|pages|includes|images)(/|$) - [L]
Can I combine the two? If so, how?