Fix redirect on subdirectories

Fix bug where module would redirect incorrectly on Magento installs in
subdirectories.