2014-04-22, 18:38:00
I'm no apache expert and I deal with it only if I have to, but as far as I'm aware, this should work:
Code:
# Usually RewriteBase is just '/', but
# replace it with your subdirectory path
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]