Options -Indexes # Don't allow index view of these folders RewriteEngine on # Enable rewrite # If the requested filename ends in jpg or jpeg... RewriteCond %{REQUEST_FILENAME} .*jpeg$|.*jpg$|.*JPEG$|.*JPG$ [NC] # The JPG and jpg versions probably aren't needed # Then grab the requested URL from the current directory on and stuff in in the $1 variable (first () pair maps to $1) # Append the $1 variable as part of the query string when processing auth.php RewriteRule (.*) http://elementsbycaroline.com/me/auth.php?img=$1 [NC,L]