RewriteEngine on RewriteBase / RewriteCond %{QUERY_STRING} (^|&)file_id=([0-9]+)($|&) RewriteRule ^degu/modules/xoonips/download.php /degu/file/%2? [R=301,L] RewriteCond %{QUERY_STRING} (^|&)file_id=([0-9]+)($|&) RewriteRule ^jm/modules/xoonips/download.php /jm/file/%2? [R=301,L] RewriteCond %{QUERY_STRING} (^|&)file_id=([0-9]+)($|&) RewriteRule ^marmoset/modules/xoonips/download.php /marmoset/file/%2? [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{REQUEST_FILENAME}index.html !-f RewriteRule . /index.html [L]