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

Found a bug? Tell us!!
Post Reply
docbrown
Regular
Posts: 10
Joined: Wed Aug 02, 2006 11:29 am
Location: Erfurt / Thüringen / Germany

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

Post 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.
Last edited by docbrown on Sat Sep 30, 2006 12:24 pm, edited 1 time in total.
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post 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!!! ;-)
Ciao, Stephan
docbrown
Regular
Posts: 10
Joined: Wed Aug 02, 2006 11:29 am
Location: Erfurt / Thüringen / Germany

Post 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.
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post 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
Ciao, Stephan
docbrown
Regular
Posts: 10
Joined: Wed Aug 02, 2006 11:29 am
Location: Erfurt / Thüringen / Germany

Post 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".
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.
Judebert
---
Website | Wishlist | PayPal
docbrown
Regular
Posts: 10
Joined: Wed Aug 02, 2006 11:29 am
Location: Erfurt / Thüringen / Germany

Post 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?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply