[wp-hackers] URL question

Dan Phiffer dan at phiffer.org
Fri Jan 1 20:54:11 UTC 2010


Hi all,

I just relaunched my personal website on WordPress and ran into an odd  
URL conflict. Here's my desired setup:

1. Posts get the URL structure: /category/slug
2. Photos are attached to a single Page with a custom template
3. Photo details are linked from /photos/ to /photos/attachment

This mostly works, but the photo detail URLs have an extra "/ 
attachment" part. So for instance I'd like http://phiffer.org/photos/attachment/2010-01-01/ 
  to instead be available at: http://phiffer.org/photos/2010-01-01/

This is possible with some mod_rewrite trickery, but it only seems to  
work for attachment slugs that don't include "2010" (because, I think,  
it conflicts with an archive path). So http://phiffer.org/photos/2009-12-27/ 
  works, but the one for today (linked above) doesn't work.

Is what I want feasible? Do I need to do some wp_rewrite stuff?

TIA,
-Dan


More information about the wp-hackers mailing list