I have a site (example.com) and on that site I have an iframe. I want that frame to bring in a site (site2.com) but not allow anyone else from directly accessing that site (site2.com) directly.
This .htacces code works on (example.com) but is only bring in the homepage of (site2.com)
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^https://example.com/$
RewriteRule index.php - [F,NC]
</IfModule>