I wan to change my premalinks to attachment pages from http://example.com/.../attachemnt/something
to http://example.com/.../attachemnt/something/something.jpg
It should simply add filename but with nice url, I tried with add query arg() but this builds url query like ?name=something.jpg
.
Is there solution to achieve this without hard coding anything to wordpress?
This doesn’t require a WordPress modification per se, but if you prefer to do it that way, here is a decent tutorial: http://shibashake.com/wordpress-theme/wordpress-page-redirect. Some people would, however, prefer to do this via the .htaccess file, here is a quick guide on how to do redirects that way: http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/#red1.