TCH-Bruce Posted January 7, 2004 Posted January 7, 2004 I've read posts on using the .htaccess file to set up redirection. Can this be used for .ZIP files as well as pages? If so can you provide an example. I have the .ZIP files in my web space and want to move them to a subdirectory called "zips". So if I have a link on another website that accesses www.****/whatever.zip I want it redirected to www.****/zips/whatever.zip Can it be done? Thanks in advance. Quote
SEO Posted January 7, 2004 Posted January 7, 2004 >redirect 301 whatever.zip http://www.****/zips/whatever.zip should do the trick. Try it and see (and let us know). Quote
TCH-Bruce Posted January 7, 2004 Author Posted January 7, 2004 Scott, thanks for the reply. Where in the .htaccess file should it go? Top, bottom? Is there a section header needed? Quote
SEO Posted January 7, 2004 Posted January 7, 2004 One line anywhere. Always wise to make a backup of the file before altering Quote
TCH-Bruce Posted January 7, 2004 Author Posted January 7, 2004 Well, since that is the only line in my .htaccess file didn't need a backup. But it didn't work. I added the following. redirect 301 bomber.zip http://www.pdabruce.com/zips/bomber.zip It didn't work as you can see www.pdabruce.com/bomber.zip This is the .htaccess file in the public_html directory I am supposed to be modifying, right? Sorry, but I feel like a newbie again! Quote
SEO Posted January 7, 2004 Posted January 7, 2004 (edited) Sorry typo, try: >redirect 301 /bomber.zip http://www.pdabruce.com/zips/bomber.zip the / in front is important Edited January 7, 2004 by TCH-Scott Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.