Forum Moderators: phranque

Message Too Old, No Replies

media content links moved - 301 redirect or .htaccess?

a .swf uri is spreading; how to redirect to containing page

         

broniusm

7:30 pm on May 3, 2005 (gmt 0)

10+ Year Member



What's the best practice for getting a .swf uri request to actually return the containing parent .php document wherein I can have ads or other site content of interest?

The situation: I posted a popular media content directly as a swf as I was creating it to a few close friends and family, but the buzz has grown from there. So, I'd like to take this visitor magnet and invite them to view the rest of my php-driven site as well. Is a change in the swf itself? .htaccess? Is there a "301 handler" in php/apache like in IIS?

broniusm

6:54 pm on May 4, 2005 (gmt 0)

10+ Year Member



Guess I hit a popular topic on a popular msg board this time..

The solution couldn't be simpler: in order to redirect a specific url (pointing to any media type-- it's all requests at this point) in apache, I modified the .htaccess file adding this line:


RedirectPermanent /videoplayer.swf http:[i]//www.mydomain.com/[/i]videoplayer.php

where gone.swf is the name of the document that moved. My only issue now is that videoplayer.swf is the actual name of the player! haha. I'll just rename within.

Thanks for your interest.

broniusm

6:56 pm on May 4, 2005 (gmt 0)

10+ Year Member



eplilogue...
Granted- if the media (swf in my case) is being consumed by a non-browser (like another swf or a standalone flash projector) expecting swf, I don't think it will play very nicely with an html document coming down the pipe! Fortunately, mine is all email-word-of-mouth for browsers to be clicking and requesting.