Load other file if exists iframe

I have problem. I need htaccess rule to show file if exists file and referer exists and is custom domain. I have problem with rule:

RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{HTTP_REFERER} !domain.com [NC]
RewriteRule ^/wp-content/uploads/files/(.*).html$ /index.php?file=$1 [L,NC]
RewriteRule ^index.php$ - [L]

Source: .htaccess

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.