Solved

IIS 6 - Problems with long URL's- linking to em in emails

Posted on 2006-10-19
5
319 Views
Last Modified: 2006-11-19
I've got a recent issue with long URL's that I sent to people to link them digital pix/jokes that I host on my Win2k3/IIS 6 web server.

The links are long because of the sub directories so they look like


http://dnr.dyndns.org/DigPix/2006/Ireland%20Trip%20April%202006/

When I link them in emails (gmail) to friends they get EXXXXTRA characters added!

so this...

http://dnr.dyndns.org/DigPix/Misc/My%20Dog/Aug%2027%20-%201.JPG

becomes this..

http://dnr.dyndns.org/DigPix/Misc/My%2520Dog/Aug%252027%2520-%25201.JPG

and then the link doesn't open

u can see it's adding the number 25 between the spaces. Annoying

is there an IIS plugin i can get to SHORTEN the URL's?  I'd like to just give out Is this just a gmail issue? odd
I've used TINYURL before to shorten links. that worked well but isn't server side
0
Comment
Question by:GigBits
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 6

Accepted Solution

by:
SCDMETA earned 125 total points
ID: 17771839
The problem is that your URLs are URLEncoded twice.

First time through all spaces are encoded to %20.

Orginal Version:
http://dnr.dyndns.org/DigPix/Misc/My Dog/Aug 27 - 1.JPG

Example of first pass encoded version with [ ] around the encoded characters.
http://dnr.dyndns.org/DigPix/Misc/My[%20]Dog/Aug[%20]27[%20]-[%20]1.JPG

Results of first pass encoding.
http://dnr.dyndns.org/DigPix/Misc/My%20Dog/Aug%2027%20-%201.JPG

The second time through all percent symbols % are convert to %25.

Example of second encoded version with [ ] around the newly encoded characters, which happen to be the % symbols created by the first encoding.
http://dnr.dyndns.org/DigPix/Misc/My[%25]20Dog/Aug[%25]2027[%25]20-[%25]201.JPG

Resulting in the double encoded URL
http://dnr.dyndns.org/DigPix/Misc/My%2520Dog/Aug%252027%2520-%25201.JPG

How are you putting the link in your emails?  Try inserting your unencoded version.  http://dnr.dyndns.org/DigPix/Misc/My Dog/Aug 27 - 1.JPG
0
 
LVL 6

Expert Comment

by:bigphuckinglizard
ID: 17772062
Spaces in filenames are the root of all evil ;-) could you just rename all the files so a ' ' becomes a '_'?
0
 

Author Comment

by:GigBits
ID: 17773019
I am generating the links from the Internet Explorer address bar, I didn't know I could just put in the unencoded version though, that works, will test and report back
0
 
LVL 6

Expert Comment

by:SCDMETA
ID: 17773113
I agree that spaces can create problems, specifically when trying to communicate the URL to another user.  Even Experts-Exchange has a problem correctly creating the link with spaces in it:

Orginal Version:
http://dnr.dyndns.org/DigPix/Misc/My Dog/Aug 27 - 1.JPG

Most email clients will incorrectly hyperlink a URL with spaces and you have to perform specific steps to have the link inserted correctly into an HTML email.  

I use Thunderbird as an email client.  It has a create link command, where you specify the text of the link , and the URL.   Good luck
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime is disastrous for companies and can lead to major hits on a brand, reputation, an…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question