RewriteEngine On RewriteCond %{HTTP_HOST} <%= hostName %> RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+) http://<%= devName %>/wp-content/uploads/$1 [L,R=301,NE]