RewriteEngine on rewritecond %{REQUEST_URI} !upload.* RewriteRule upload/(.*)$ /download.php?id=$1