Is it possible to use an htaccess file to allow iframes within one directory?

Hi, the server for my site is set to disallow frames. Site is https://   magickitchen.com.

Is it possible to use an htaccess file to allow iframes within one directory? If so, how? Thanks in advance
mel200Asked:
Who is Participating?
 
Julian HansenCommented:
When a site does not want to be iframed it has a few options for doing this - one of these is for the server to send the header (this is what your site is doing)
X-FRAME-OPTIONS: DENY

Open in new window

This tells the browser not to allow content in an iframe for that site.

For you to be able to do what you have requested we would need to know where this header is being set. Then you would need to override that header for the folder you want iFramed.

The question is : do you want to open the iframe for anyone (any origin) or only for pages that originate from your site?

By setting
X-FRAME-OPTIONS: SAMEORIGIN

Open in new window

You can iFrame your own pages while still denying iframe requests from pages originating from other domains.

You can read more about X-FRAME-OPTIONS here https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
0
 
Shaun VermaakTechnical Specialist/DeveloperCommented:
Post your current htaccess please
0
 
mel200Author Commented:
Here it is with the suffix .txt.
.htaccess.txt
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
Dave BaldwinFixer of ProblemsCommented:
No.  iFrames are accessed thru the web browser.  The web server does not even know about them.  To the web server, it is just another file.
0
 
mel200Author Commented:
So I should ask the person who handles the server to make a change like this: https://serverfault.com/questions/854461/apache-config-allow-iframes-only-for-a-specific-directory  on the server.
0
 
Julian HansenCommented:
If that is how it has been implemented then that would be the fist port of call.
0
 
mel200Author Commented:
Thanks, all!
0
 
Julian HansenCommented:
You are welcome.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.