0

I created a website on The XAMMP server in a folder. Inside the website I put a line<iframe width="800" height="800">subwebsite1.html</iframe>. I learn about X-frame-options and I wanted it to be tested. So i created a file .htaccess and i put there a line: X-Frame-Options: DENY and inside a subwebsite1.html I put a line <img src="foto1.jpg">. And if I run my website on XAMPP server e.g. \localhost\htdocs\index.html it still works. So what did I wrong? I wanted to tested it and I fought it could't work any more but it still works. Neither did I sometging wrong nor I don't understand what it all means. Please help me...Thanks in advance for any help

jmargolisvt
  • 5,722
  • 4
  • 29
  • 46
wojbuk
  • 13
  • 5
  • Do any directives in your `.htaccess` work? If not, [this question](https://stackoverflow.com/questions/17162214/htaccess-not-working-on-localhost-with-xampp) might be useful to you. – Nisala Mar 29 '20 at 14:54
  • Nothing. I just simpy put one line. X-Frame-Options: DENY Is it not enought?:) – wojbuk Mar 29 '20 at 15:12
  • Try adding something else and see if that works. If it doesn't, then it's possible your .htaccess isn't working at all. The question I linked has some suggestions that might help. – Nisala Mar 29 '20 at 15:27
  • I will take a peak tomorrow.... For now thanks a lot:) – wojbuk Mar 29 '20 at 15:39
  • Thanks a lot... It works....My htaccess didn't work properly. I do appeciate:) – wojbuk Mar 29 '20 at 19:45
  • Great! I submitted that as an answer -- please mark it as the answer that worked for you! – Nisala Mar 30 '20 at 20:06

1 Answers1

0

It's possible your .htaccess isn't enabled at all. Try putting something else in that file, and if it doesn't work, check the answers here.

Nisala
  • 1,313
  • 1
  • 16
  • 30