Author Topic: Unwanted slashes  (Read 1668 times)

0 Members and 1 Guest are viewing this topic.

Offline Steen

  • album.pl User
  • *
  • Posts: 4
  • Karma: +0/-0
  • I forgot to change the default text
Unwanted slashes
« on: October 10, 2009, 06:45:04 »
Are there any who can tell me where i shall correct to remove the extra Slash the album adds to an URL when i use the first picture as thumbnail?
like this: http://www.yourserver.com//picture.jpg

the extra slash before picture in the above line

thanks in advance
Steen
« Last Edit: October 10, 2009, 14:57:45 by Steen »

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: Unwanted slashes
« Reply #1 on: October 16, 2009, 09:21:24 »
Hi Steen,

It may just be sloppy coding on my part... the double / shouldn't have any detrimental effects, have you had a problem?

Cheers
Mike

Offline Steen

  • album.pl User
  • *
  • Posts: 4
  • Karma: +0/-0
  • I forgot to change the default text
Re: Unwanted slashes
« Reply #2 on: November 03, 2009, 10:36:03 »
Hi Mike.
Those double slashes only cause problems. Do you mind telling how to get rid of them?
http://yourserver.com/picture.jpg
That would be great.

Sincerely
Steen

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: Unwanted slashes
« Reply #3 on: November 03, 2009, 10:52:21 »
Hi Steen,

What sort of problems are you seeing?

http://yourserver.com/picture.jpg should be the same as http://yourserver.com//picture.jpg or even http://yourserver.com//////picture.jpg for that matter... The tricky part is that the double slashes may occur from any number of locations, as the image URLs are being built so it's not a simple matter of finding the one source of the //'s, as there are potentially many.

One way you can cut down on the //'s is to run through your config again and see if there are any trailing/leading slashes that can be removed. Sometimes these are the cause.

Sorry I couldn't be more definitive.


Cheers
Mike

Offline Steen

  • album.pl User
  • *
  • Posts: 4
  • Karma: +0/-0
  • I forgot to change the default text
Re: Unwanted slashes
« Reply #4 on: November 14, 2009, 05:47:51 »
http://yourserver.com/picture.jpg This leaad to the picture. http://yourserver.com//picture.jpg this lead to the error 404 page. Maybe it works on UNIX servers. but not on other serers

try this: http://sbrandt.dk// and you will get the 404 page. No more no less.

Sinhcerely
Steeb

Offline Steen

  • album.pl User
  • *
  • Posts: 4
  • Karma: +0/-0
  • I forgot to change the default text
Re: Unwanted slashes
« Reply #5 on: November 19, 2009, 03:59:18 »
Hi Mike;
I had found a solution which can be used. There are some drawbacks
If i set this code: $thumbnail_html=~s/([^:])\/\//$1\//g;  after it had generated the Thumbnails. the double // will be removed. Drawback is that personal thumbnails cannot be used. Only the first photo in a folder can be used as thumbnail..

Sincerely
Steen
 

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: Unwanted slashes
« Reply #6 on: November 24, 2009, 16:47:24 »
Thanks for your work Steen... that's probably about as good a solution as any... if I come up with something better I'll let you know!


Cheers
Mike