[wp-hackers] Trailingslashit to re_canonical

Andrew Nacin wp at andrewnacin.com
Fri Apr 9 17:23:47 UTC 2010


>
> Since every link is redirected to a slashed version in the function
> redirect_canonical, every canonical url output via rel_canonical should have
> a slash also.


get_permalink() uses user_trailingslashit, which adds the trailing slash if
the permalink structure specifies a trailing slash. I'm pretty sure
canonical works the same way -- it won't assume a trailing slash is
canonical if the permalink structure doesn't have /$.


More information about the wp-hackers mailing list