putting a basepath

parameterizing application for redirecting