This redirection script solves the problem of portions of the new URL being dropped and allows you to redirect visitors to any page that you would like. The entire redirected path is preserved including special characters and variables.
If you have multiple domain names pointing to the same web site, this simple script will allow you to redirect the user to a subdirectory based on the web address then type in the browser.