Redirecting movies

design

#1

A number of magazine articles and other sites have linked to specific QuickTime movies on my site, using URLs such as http://www.mitchellrose.com/Deere John_300k.mov

I have recently put in better quality QT movies, but have left those old movies on the server so that links to them will still work. I’d prefer that people go to my home page where they will find the newer better movies, and discover other ones as well.

Is there a way to replace those old movies with something that would automatically bounce someone to my home page? In other words, when someone clicks on http://www.mitchellrose.com/Deere John_300k.mov they go http://www.mitchellrose.com

Thanks very much.

Mitchell Rose
http://www.mitchellrose.com


#2

Yes, simply add some redirects to your .htaccess file.

redirect “/Deere John_300k.mov” http://www.mitchellrose.com/index.html

Create a file called .htaccess in the root directory of your domain and add a line like the one above for each file you want to redirect to your homepage. If a .htaccess file already exists, simply add the lines to the bottom of the file.

Mark

Edit: Added quotes to redirect above, due to space in filename.


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )


#3

Thanks so much, Mark. What an easy solution.

My web designer found there was an .htaccess file in place – one we had put up a while ago to block porn sites from linking to mine. So we added the redirect lines to the end of it as you suggested. But it created a server error for the site. Here it is. Can you see a problem?

SetEnvIfNoCase Referer “^http://217.172.178.173/nuc/index.php” BadReferrer
SetEnvIfNoCase Referer “^http://217.172.178.173/nuc/index.php?blogid=1” BadReferrer
SetEnvIfNoCase Referer “^http://217.172.178.173/nuc/index.php?catid=7&blogid=1” BadReferrer
SetEnvIfNoCase Referer “^http://www.hannoverboard.com/forum/showthread.php” BadReferrer
SetEnvIfNoCase Referer “^http://www.hannoverboard.com/forum/showthread.php?s=&threadid=10413” BadReferrer
SetEnvIfNoCase Referer “^http://www.hodenmumps.net/” BadReferrer
SetEnvIfNoCase Referer “^http://ffkieke.web-log.nl/” BadReferrer
SetEnvIfNoCase Referer “^http://duhh.web-log.nl/” BadReferrer
SetEnvIfNoCase Referer “^http://wilhelmina.blogspot.com/” BadReferrer
SetEnvIfNoCase Referer “^http://www.lusthaus.com/forum2/showthread.php” BadReferrer
SetEnvIfNoCase Referer “^http://217.172.178.173/nuc/” BadReferrer
SetEnvIfNoCase Referer “^http://www.wikingerversand.de/” BadReferrer
order deny,allow
deny from env=BadReferrer
redirect /Deere John_300k.mov http://www.mitchellrose.com/index.html
redirect /Elevator World_300k.mov http://www.mitchellrose.com/index.html
redirect /Islands in the Sky_300k.mov http://www.mitchellrose.com/index.html
redirect /Name Categories_300k.mov http://www.mitchellrose.com/index.html
redirect /Treadmill Softly_300k.mov http://www.mitchellrose.com/index.html
redirect /self-interview_300k.mov http://www.mitchellrose.com/index.html
redirect /Unleashed_300k.mov http://www.mitchellrose.com/index.html
redirect /Weightless_300k.mov http://www.mitchellrose.com/index.html
redirect /Case Studies_300k.mov http://www.mitchellrose.com/index.html

Mitchell Rose
http://www.mitchellrose.com


#4

You have an extra space in there. If the filename has a space in it, you must enclose the path in quotes. The previous poster mentioned this as well. So it should look like this:

redirect "/Deere John_300k.mov" http://www.mitchellrose.com/index.html I’d also recommend not using spaces in filenames in the future, as it will almost always cause problems somewhere.


If you want useful replies, ask smart questions.


#5

Yes, as kchrist mentioned, you have to enclose the file paths in quotes if they contain a space.

I did mention this in my original reply, but I guess you read it before I made the edit. :slight_smile:

Mark


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )


#6

And there shouldn’t be any need to explicitly name the default index file; it’s sleeker and cleaner without it; in other words, use http://www.mitchellrose.com/ instead of http://www.mitchellrose.com/index.html.

– Dan