Putting back relative redirects

issue #1523

- also added some comments to indicate the difference between the two custom middleware files.
Merge pull request #1565 from ErisDS/redirect-fixes

Putting back relative redirects