Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Iphone Ipad crashes because of my .htaccess and iframe

1:38 pm on Apr 8, 2016 (gmt 0)

Junior Member from US 

10+ Year Member

joined:Feb 27, 2004
votes: 0

I have a perl script.. that gets shown inside an iframe.

Google was indexing the script.. and not the page..
So what I did.. was in my .htaccess file exclude access directly to the script...
That is... you can only see the script if you access the page that includes it.
So this works fine and for the first month or so I didn't see any 403 errors being generated by the problem.

Recently all Iphone and Ipad users are being blocked from seeing the script being generated in the Iframe.
Droid users don't appear to be having this problem. I tested with my phone and tablet.

I don't know if the Iphone and Ipads have cached my page and calling it from the phone in place of the actual page ?
I don't know if the Iphone and Ipad have this problem when not viewing in "Desktop" mode (not sure even if that's available for Apple users) ?

I saw a bit of html5 code called sandbox that has an attribute called sandbox and "allow-scripts"...
Maybe a fix ?

Obviously I don't have an Apple device otherwise I would have caught this immediately.
I tested the site with a web based mobile comparability for Iphone and Ipad... and saw no errors... but that might just be because the web based site is not "pure" at accessing my site as a "real" Apple product would and is only testing for mobile responsiveness.

I am going to go to my local computer store and try viewing my site on an Ipad or what ever Apple device they have...
But I fear I may get the same result.

Any thoughts or ideas from knowledgeable people ?

This is the thread where I originally set my .htaccess file so you may see what I am doing..

Thanks !
11:48 am on Apr 9, 2016 (gmt 0)

Junior Member from US 

10+ Year Member

joined:Feb 27, 2004
votes: 0

It looks like this is actually my fault because I am running my own Perl script for error reporting.
I am now looking at my actual server logs this morning and I am not seeing the problem.
403's only appear for bots trying to access the scripts directly, which is intended.
If a person visits the page with the script in iframe, my raw server logs don't appear to generate the 403 error.

I checked my "script error" reporting a bunch after I started using the particular code in the htaccess file Feb 27th..
to see if there were any problems, and there were none. Why did they start two weeks ago.. and why for only Iphone and Ipad ? No need to dwell on that.