MikroSight.com

MikroSight.com

| Home | NPA/NPX |

Google
Web
MikroSight

Using Apache Server Redirects

UPPER/lower case issues - this came from 404 errors showing up in the server logs when people tried to download some of our software.  In researching why, we found the culprit to be WinZIP.  When I zipped up files before uploading to the server, WinZIP always put a capitalized extension of .ZIP on the file. 

I always try to use lower case because of the distinction that Linux/Unix makes in UPPER/lower case file names - where thisfile.zip, THISFILE.ZIP, thisfile.ZIP are all considered different files.  This is NOT the case for DOS/Windoze based machines where case is not considered.

Anyway, somehow we got a file on the server with a .ZIP extension, but the download link referred to it with a .zip - two different animals. 

Simple Solution: works for either file name without having to change the page.

Redirect /downloads/txpick3.zip http://www.mikrosight.com/downloads/txpick3.ZIP

You can also add the word Permanent to the line which tells the user software and search engines that it is a permanent redirection versus temporary.

You can also use .htaccess to do custom error pages.

See my other tutorials