RewriteEngine on # Uncomment this if mod_rewrites are not working for you. some hosting services have cranky mod_rewrite # RewriteBase /liberty/ RewriteCond %{SCRIPT_FILENAME} -f [OR] RewriteCond %{SCRIPT_FILENAME}/index.php -f RewriteRule ^(.*)$ - [L] RewriteRule ^view/file/(.*)$ view_file.php?attachment_id=$1 [L,QSA] RewriteRule ^download/file/(.*)$ download_file.php?attachment_id=$1 [L,QSA]