two thoughts here:
you wont be able to embed an iframe if you can’t hit the url directly… so… can you load <mydomain>/wp-content/uploads/html5app/index.html in a browser without issue or do you get 404?
next thought / if it does show the wp error page, can you add an exception to your htaccess?
along the lines of:
RewriteRule ^print.php$ – [L]
more info here: https://wordpress.org/support/topic/how-to-make-htaccess-exceptions?replies=2
–> per that thread, i would suggest moving the html5 app to the docroot of the wordpress install:
<mydomain>/html5app/index.html
I should have added that your exception would look like:
RewriteRule ^html5app/ – [L]
and that the exception goes inbetween the rewritebase and the rewrite rule
Hi bernbe01
Thanks for your answers.
First of all, If I access the url directly without putting it in the iframe, I get the same result as if use it through an iframe.
In both situations I get the 404, so I am pretty sure that it is a rewrite issue.
But if I understand the standard wordpress .htaccess file then this :
RewriteCond %{REQUEST_FILENAME} !-f
This condition is true if the the path REQUEST_FILENAME not refers to an existing file.
(source: )
So since I try to access an existing file ( the index.html file) in the html5 app path directly, I would expect this rule to not send the url to the index.php file of wordpress.
But I have now tied to add the RewriteRule to the wordpress site url file, and now it does not send the url to wordpress index.php file.
So your suggestion actually works, but I would expect it not to be a problem because of the :
RewriteCond %{REQUEST_FILENAME} !-f
Can you explain this? Have I understood it wrong?
Sorry something went wrong above, so I ended up adding a link to the source for almost the entire post 🙂
i can’t explain it too deeply 😛 but I’ll try. if i’m misspeaking please someone correct me
htaccess will apply the first match or exclude it finds, so the top is the highest priority in an htaccess directive for rewrites
the RewriteCond %{REQUEST_FILENAME} !-f path is looking for a filename in your top lovel (docroot) so it’s not looking for a match on the folder level
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
the above suppsoedly accounts for both, but i can’t confirm as I don’t use my uploads folder for anything other than wp-managed content
good read