[wp-trac] [WordPress Trac] #15619: General Settings Tab Not Allowing trailing URL slash to be stored in Site & WordPress address (URL)
WordPress Trac
wp-trac at lists.automattic.com
Wed Dec 1 10:50:14 UTC 2010
#15619: General Settings Tab Not Allowing trailing URL slash to be stored in Site &
WordPress address (URL)
--------------------------+-------------------------------------------------
Reporter: dsquared | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone:
Component: General | Version: 3.0.1
Severity: normal | Resolution:
Keywords: dev-feedback |
--------------------------+-------------------------------------------------
Changes (by demetris):
* cc: dkikizas@… (added)
* keywords: general settings, trailing URL slash not storing => dev-
feedback
* version: => 3.0.1
Comment:
@dsquared, @billslawski,
Do you see this issue with links generated by WP itself or by Twenty Ten?
As far as I know, the functions for generating a home URL do not append
the trailing slash automatically, which can lead to the 301 issue when WP
resides in a subdirectory. But the trailing slash can be specified. The
recommended function to show the home URL is {{{home_url()}}}, which in
Twenty Ten and in core is used like this:
{{{home_url('/')}}}
There is also {{{get_home_url()}}}, which can be used like this:
{{{get_home_url('', '/')}}}
I am not sure this is the most intuitive way, but it is more or less
standard in core and it works as it supposed to.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15619#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list