Page 1 of 1

trailing slash in url prob (was: URL lower upper case bug)

Posted: Fri Sep 29, 2006 8:57 pm
by docbrown
Hi!

I found a undesirable behavior after upgrading my webblog from wordpress to serendipity. Serendipity doesn't accept url's in lower case respectively it expects the url's in correct upper-lower case just as the author wanted the article header to be. For example:

There is a link in another weblog (to my one). The link points to my weblog.
<url>/2005/12/24/schnee-oder-30-tage-bis-zum-nervenzusammenbruch

But my new/actual link is <url>/2005/12/24/Schnee-oder-30-Tage-bis-zum-Nervenzusammenbruch

The result is that serendipity reports "no entries found". Is there already a working fix for my problem? Serendipity needs to understand upper and lower case url's.

Thx.

Posted: Fri Sep 29, 2006 9:13 pm
by stm999999999
Sorry, I am not able to help you now (perhaps I have an idea later), but your choosen words are very nice ;-)

"to upgrade" from wordpress to serendipity! Yeah, s9y rules!!! ;-)

Posted: Fri Sep 29, 2006 9:24 pm
by docbrown
*ggg*

Sorry, it's late ... u know. :-)

The solution must be in how serendipity interprets given url's. Isn't there a simple php function that does the behavior i want? For example wordpress doesn't discern between

<url>/2006/09/29/Doppeltes-SpielziMMer/
or
<url>/2006/09/29/doppeltes-spielzimmer/
or
<url>/2006/09/29/DOPPELTEs-SpielziMMer/

and so on.

Posted: Fri Sep 29, 2006 10:07 pm
by stm999999999
hm, I must take a look at the code, because this is not the normal way for s9y to identify an article. normaly it works with the identifier and the rest is unimportant:

blog/archive/15-text-or-another-text

Posted: Sat Sep 30, 2006 12:23 pm
by docbrown
I'm so sorry. It's not a lower upper case problem. It is a problem with a trailing slash at the end of the url. Every url or link with this trailing slash results in "no entries found".

Posted: Sat Sep 30, 2006 10:25 pm
by judebert
Ah. That's because it's expecting URLs with a slash on the end to be directories or permalinks, like archives.

Don't use the trailing slashes.

Posted: Mon Oct 02, 2006 12:53 pm
by docbrown
judebert wrote:Ah. That's because it's expecting URLs with a slash on the end to be directories or permalinks, like archives.
Indeed.
judebert wrote:Don't use the trailing slashes.
That's exactly the problem. :-) Isn't there a workaround for serendipity?

Posted: Mon Oct 02, 2006 1:58 pm
by garvinhicking
Hi!

Maybe you could create a RewriteRule that adjusts all trailing spaces in your pattern to be removed?

The other way would be to edit serendipity's heart for URL routing in index.php, and check which preg_match() case shoudl be executed and then adjust the regexp there...

HTH,
Garvin