我有一个网站,我有一个子文件夹那里有文件,我喜欢在我的索引页上嵌入。但我想让用户直接查看该子文件夹。.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