Answer the question
In order to leave comments, you need to log in
How to give page access through .htaccess only through iframe?
I found the code itself, but it is necessary that the page be accessed only through the iframe
and the page itself is file.php, which I changed into
RewriteRule ^file/([^/]*)$ /file.php?id=$1 [L]
i.e. the file site. com/file.php?id=3-> site.com/3
and there should be access only via iframe
here is the code that does this but you need to glue them somehow
RewriteCond %{HTTP_REFERER} !site.com
RewriteCond %{REQUEST_URI} ^/ path/to/protected/page$
RewriteRule . -[F]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question