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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shaun VermaakTechnical SpecialistCommented:
Post your current htaccess please
0
mel200Author Commented:
Here it is with the suffix .txt.
.htaccess.txt
0
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
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.