use relative links on attachment view
closes #368
remove unnecessary redirect
Merge pull request #372 from just-boris/master

use relative links on attachment view