Hi I have a video file on my server and when people try to access it I want to send them to a specific web page instead. I tried this in .htaccess but it didn't seem to work: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^videos/2008/my-video.avi$ videos/2008/video.html </IfModule> Code (markup): I also tried some different variations, like: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/videos/2008/my-video.avi.*$ [NC] RewriteRule . /videos/2008/video.html [L] </IfModule> Code (markup): But that didn't work either... Do you have any idea what I might be doing wrong? - Hannes
You do not need that "ifmodule" part video for .htaccess file. You should place this in your .htaccess: RewriteEngine On RewriteBase / RewriteRule ^videos/2008/my-video.avi$ /videos/2008/video.html [L] Code (markup): That should do the trick.
OK, thanks. Seems like I also had to move this to the top of the .htaccess file because there were a few other RewriteRules there apparently interfering with it when I had it at the bottom...