If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Show video on home page - get 403 forbidden

Show video on home page - get 403 forbidden

Started by cath on 14 Dec 2024, 3:38 AM · Views: 678

Results 1 to 3 of 3
14 Dec 2024, 3:38 AM
#1
cath avatar

cath

New Zenner

Join Date:
Jun 2006
Posts:
21
Plugin Contributions:
0

Show video on home page - get 403 forbidden

I'm using ZC 2.01 and the Fluorspar template. No other plugins.

I'd like to show a video on the home page. This is the code I'm using:

    <video>
      <source src="/images/videos/video1.mp4" type="video/mp4">
    </video>
    <img src="/images/clothing/dress1.jpg">

in includes\languages\english\html_includes\define_main_page.php

The image was simply a test to make sure my path's okay - the image displayed fine.

In the browser inspector, I get "Failed to load resource: the server responded with a status of 403 (Forbidden)".

There's nothing in the log file.

Thanks in advance

14 Dec 2024, 10:07 AM
#2
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Re: Show video on home page - get 403 forbidden

In the images folder there is a .htaccess file which restricts the file types that the server will return:

but now allow just certain necessary files:

<FilesMatch "(?i).*.(jpe?g|gif|webp|png|svgz?)$">

You need to add the mp4 file extension to that list.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

14 Dec 2024, 7:02 PM
#3
cath avatar

cath

New Zenner

Join Date:
Jun 2006
Posts:
21
Plugin Contributions:
0

Re: Show video on home page - get 403 forbidden

Perfect! Thank you