Re: [openupload-devel] Different URLs ?
Status: Beta
Brought to you by:
tsdogs
|
From: Alessandro B. <ts...@br...> - 2010-10-21 17:33:15
|
Il 21/10/2010 18:56, nik...@xe... ha scritto: > > Hi, > > when using OpenUpload, we ran into the following problem: > > - A user generates a Download-Link, and sends it by mail (Thunderbird client) > to a Mac user. > The Mac user gets: > > https://www.exampleserver.net/openupload/?a=d&i=r7t8DuGPOv > > instead of > > > https://www.exampleserver.net/openupload/?a=d&i=r7t8DuGPOv > > So the ampersand is escaped, which makes the link unusable. > > Of course one could try to find out why this happens and what workaround > can be applied on the Thunderbird or Mac side. > But I think it would be safer to create safer URLs to begin with, for > example > > https://www.exampleserver.net/openupload/d/r7t8DuGPOv > > with no special characters excaept the slash. > This could be done fairly easy by using Apache rewrite module, so that > Apache would rewrite > > https://www.exampleserver.net/openupload/d/r7t8DuGPOv > back to > https://www.exampleserver.net/openupload/?a=d&i=r7t8DuGPOv > > upon calling the URL. And of course, the slash URL would also be displayed > in the Interface and sent by mail. > > This shouldn't be too hard, using the Apache rewrite module. Of course this requires access to the rewrite module (and to Apache). > Did anyone already do this? Did I maybe miss an option that already > delivers this? > > If not, I would probably do this and post the result. > > Or am I missing something that makes my idea look undesirable or unnecessary? > Hi, Sure it can be done. mod_rewrite support was one of the features scheduled for future releases. Why is that unusable? By specification the first notation (the one used by openupload) is the wrong one in an html document (browsers fix that but it's wrong). in urls the ampersand should be noted as & if it's html but not the text version. Probably you have some html to text conversion, and that's where the problem is. I do agree with you that having a mod_rewrite structure should be the best. Also a notation like http://www.exampleserver.net/openupload/index.php/d/r7t8DuGPOv could work, without needing mod_rewrite access, but urls need to be fixed and handled in the application for that to happen. mod_rewrite can be tweaked to support that notation already so any feedback is appreciated. Alessandro |