RewriteEngine On

# allow AJAX requests
RewriteCond %{HTTP:X-Requested-With} =XMLHttpRequest [OR]

RewriteRule ^ - [S=1]

# block direct access to protected dirs
RewriteRule ^(config|SRC|playtmp|postsSRC|sources|vendor)(/|$) - [F,L,NC]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)$ profile.php?u=$1 [L,QSA]



