简体   繁体   中英

In a Typo3 site, which .htaccess do I modify to add content types?

I'm making a site with a BigVideoJS panel, based on VideoJS. I am experiencing the common "Firefox won't play a HTML5 video" bug. If I load the page from a static file, it plays fine, but if I load it as localhost (or, for that matter, from the remote server), then I get the error:

"HTTP "Content-Type" of "text/plain" is not supported. Load of media resource http://localhost:8888/video/video_name.webm failed.

There are many suggestions around the web to add some content types into the .htaccess in order to fix this problem, like so:

AddType video/webm .webm
AddType video/ogg .ogv
AddType video/mp4 .mp4

My question is, in the case of a Typo3 (6.0.8) CMS situation, is this still the correct way to add new content types? And if yes, which .htaccess should I add those lines to? This install (inherited from a previous developer) contains one in /www/ directory, one in the /domain-name/ directory, and one in the /site/ directory.

I've tried adding the lines above to the /site/ directory .htaccess and restarting apache- it didn't resolve the problem, Firefox is still not loading the video. Am I trying to solve the wrong problem, or am I doing it wrong?

Edited to add:

Would hosting the video on an external streaming site such as Vimeo solve this problem, if the .htaccess doesn't?

The .htaccess file you are looking for is the one in the dir that (among other things) contains the main entry point for that installation, index.php (may be a symlink), and the typo3conf directory. It will probably contain something like

RewriteEngine On
RewriteRule ^typo3$ - [L]
RewriteRule ^typo3/.*$ - [L]

You can test if it's the right file by breaking it for a second (by adding incorrect code) and seeing if the website reacts. Or some more decent test.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM