Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 14th, 2012  |  syntax: None  |  size: 0.74 KB  |  views: 27  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Force video/webm mime type using .htaccess based on request uri
  2. RewriteRule   (.+?.fid)/ /$1 [L]
  3.        
  4. AddType video/webm .webm
  5.        
  6. <FilesMatch  ".webm$">
  7.   ForceType video/webm
  8. </FilesMatch>
  9.        
  10. RewriteCond %{REQUEST_URI} .webm$
  11. RewriteRule .* - [T=video/webm]
  12.        
  13. RewriteRule .webm$ - [T=video/webm]
  14.        
  15. RewriteRule someRegEx$ - [T=video/webm]
  16.        
  17. header("Content-type: video/webm");
  18.        
  19. AddType video/webm .fid
  20.        
  21. RewriteCond %{REQUEST_URI} .webm$
  22. RewriteRule (.*) $1 [E=is_webm:true]
  23.  
  24. Header set Content-Type video/webm env=is_webm
  25.        
  26. location ~.webm$ {
  27.   add_header Content-Type video/webm;
  28.   rewrite  (.+?.fid)/ /$1  break;
  29. }
  30.        
  31. <IfModule mod_rewrite.c>
  32.   AddType video/ogg .ogv
  33.   AddType video/webm .webm
  34.   AddType video/mp4 .mp4
  35. </IfModule>