[Bb-trac] Re: [bbPress] #1126: repermalink fails,
causing redirect loop on SunOS (Solaris?), and 404 errors.
bbPress
bb-trac at lists.bbpress.org
Thu Jun 25 18:20:14 GMT 2009
#1126: repermalink fails, causing redirect loop on SunOS (Solaris?), and 404
errors.
----------------------------------------------------------------------+-----
Reporter: SteveBooth | Owner:
Type: defect | Status: new
Priority: high | Milestone: 1.5
Component: Front-end | Version: 1.0-rc-1
Severity: major | Resolution:
Keywords: Sun SunOS Solaris bb_repermalink redirect loop 404 error |
----------------------------------------------------------------------+-----
Comment (by SteveBooth):
Okay. I'm sorry, this makes no sense at all to me. I don't understand
what bb_repermalink is doing with a perfetly normal url. When the user
browses to the bbPress root, the first thing that is done is call
repermalink. With the above code in place, the exactly correct uri is
placed in REQUEST_URI. $page is set to 1 when the routine is called, and
the location is 'front-page'. This is a PARAMETERLESS uri; there is no
question-mark anywhere in the uri. As a result, the $querystring is
empty, as it should be, and there are no $ars, which I believe is correct.
$permalink is correctly set (i think) to the root path minus the .php
file, but after extracting the domain and cleaning up the uri,
bb_permalink does this BIZZARE test wherein it's compareing $check (which
is null) and $uri, and generating a 404 as a result.
SO... here's my question. If...
$domain is //stevenmbooth.com and
$permalink is http://stevenmbooth.com/bbpress/
why in the world would the following replace be correct:
{{{
$check = preg_replace(
'|^.*' . trim($domain, ' /' ) . '|',
'',
$permalink,
1
);
}}}
Because that is what is creating a null $check, and that is what is
causing the 404 on a perfectly good uri.
--
Ticket URL: <http://trac.bbpress.org/ticket/1126#comment:14>
bbPress <http://bbpress.org/>
Innovative forum development
More information about the Bb-trac
mailing list