Image Slider not showing on Moodle - Iphone/Ipad Chrome and Safari

  1. Images of slider not showing on Safari mobile (Iphone/Ipad) when RewriteEngine in .htaccess is "on". When is Off images appears:
    This is the content of the .htaccess:
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://localhost [NC]
    RewriteRule ^ https://google.com/ [L]
  2. Platform and version number: Moodle 3.2.3
  3. Mobile
  4. Browser: Chrome, Firefox, Safari
  5. H5P plugin version: mod_hvp_moodle35_2018082200
  6. H5P content type and version (if a content type was used), and a sample URL or attached H5P.
  7. Any browser console errors
  8. Any PHP errors
  9. Screenshots if it's a visual problem
Attachments: 
thomasmars's picture

Hi,
Your site is not able to load the libraries for some reason.
Make sure your site is properly set up according to Moodle's guidelines for installation and slash arguments.
You can also try to set

$CFG->mod_hvp_aggregate_assets=0

temporarily in your config.php for your site, then try again to see if you're still getting the error.

Hi,

the reason is the RewriteCond %{HTTP_REFERER} in the .htaccess file, when enabled it does not work.

I've tried setting mod_hvp_aggregate_assets=0 but still does not work:

Tks for your support.

Attachments: 
icc's picture

When your web server sends a file to the browser it adds a content type header saying which type of file it's sending. With your current web server setup you're not sending the correct content type headers for files served by Moodle.

1. Where is your .htaccess file located?

2. Do you have anything else in the file? If so, have you tried just commenting out the rewrite rule?

3. Most likely your domain isn't localhost since you've censored it, meaning the rewrite rule will redirect the request for the file and try to get it from google.com instead. Try inspecting the request in your network tab.