当另一个网站尝试对我的网站进行 iframe 时,我尝试显示错误消息。我正在使用 .htaccess:
header 设置 X-Frame-Options DENY
但是,这只会创建一个空白页面,没有 iframe。是否可以显示错误消息,而不仅仅是空白屏幕?
更新
我没有寻找任何 JavaScript 解决方案
最佳答案
您可以在消息中显示自定义错误页面。
ErrorDocument 403 /access.html
了解更多详情:1。 http://www.hostingmanual.net/fun-with-htaccess-tutorial-examples/
关于html - 框架 .htaccess 时显示消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41186475/