ventrilqstman
Member
Posted 5 months ago #
I just read in the permalinks page that we need to end with the post name (%postname%) or ID. But I can't figure why or what happens if we don't.
I have a site (f164.com/journal) that I set up previously that uses /%postname%/%monthnum%/%year%/ and it seems to work. Can someone explain why we need to be limited to ending with %postname% vs closing with a date, etc. Is the way I'm doing it breaking something that I'm not aware of.
Thx.
They don't NEED to, they just ... do because that's how we think :)
Also if you go to domain.com/2011, you'll get ALL the posts from 2011, so logically having a post go YYYY/MM/POSTNAME follows from that. Human readable and follow-able.
Nothing will break if you do it your way though.
ventrilqstman
Member
Posted 5 months ago #
Makes sense. It just seemed as if it was made an important issue in the codex. Thanks for the info.
Before 3.3, having a URL of (or starting with) %postname% would seriously slow your site down. Today, not as horrible :)
@Ipstenu
I experimented with permalink structures in the past and once set it to end with a file extension like %postname%.html to blur the permalink structure to the bouncing user. I don't do it anymore on production sites but recently I tried it on my localhost resulting in a lot of 404s.
My question is: what's up with ending the permalinks with a file extention, like %postname%.html, .htm, .shtml, .jhtml, etc.? Is it OK to use or not recommended?
Never recommended to use a filetype with WP, especially since it's like the cake. A lie.
Just end with %postname%
A user's gonna figure out the structure once they visit your site, and remember you WANT people to remember your URLs so they can come back and find stuff!