我有一個網站,我有一個子文件夾那裏有文件,我喜歡在我的索引頁上嵌入。但我想讓用戶直接查看該子文件夾。.htaccess:允許iframe從subdir只能從根目錄查看
所以。我有http://mysite.com/index.php那裏有一個iframe:
和我有一個子文件夾OPT2與index.php文件與一個iframe:
<iframe src="http://mysite.com/opt2/" id="shopIframe" name="shopIframe" onload="alert('a');" frameborder="0" height="90%" width="100%" scrolling="auto"></iframe>
我有一個.htaccess文件:
RewriteEngine on
RewriteCond %{HTTP_REFERER} http://mysite.com/opt2/ [NC]
RewriteRule /*$ http://mysite.com/index.php [R=302,L]
是.htacces可能嗎?
你可能會在serverfault或網站管理員 – 2012-02-28 17:09:17