I am running wordpress 3.2rc2 multisite.
I inserted a few .mp4 videos into the root of my domain so that I can run a few basic tests with the jw player.
When I try to access the url to the .mp4 video, I somehow end up with a wordpress 404 page. This is also causing errors within the jw player saying that either the file is not found, or access is denied. Permissions are 644 on the mp4 files, and the owner/group is correct.
Why is this happening and how do I fix it so that wordpress stops messing with my mp4 files?
Also: can someone please add the mp4 tag, I don’t have enough rep to do this yet.
Here is my htaccess file:
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]
RewriteRule . index.php [L]
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm
Edit
If I use the wordpress media uploader, then I can access the mp4 videos just fine. I just can’t place them anywhere else on the server which is a problem.
Anyone have any further ideas as to why wordpress is screwing with my mp4s when in other directories or even when they are in the root?
A missing mime type should not cause a 404 page but the AddType needs to be wrapped in
<IfModule mod_mime.c>
tags.I’m running jw player on a multisite and I had to use absolute urls to access the player and the file. I created a folder in my site root that contained the player and files then wrote a function to display the video and enqueued the swfobject using wp_enqueue_script.
Do you have the correct capitalization for the filename?
These rules basically say that if the file exists, serve it instead of going on to the WordPress rules:
That says if the requested file is a file that exists or if it’s a directory that exists, then do no rewrite, and stop processing ([L] = Last rule).
So you must have the filename wrong in some fashion, because if the file existed with the given name, then this rule forces it to serve it up properly.